Web/Reception/ChangRoom.ashx.cs

(开头部分) 4KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Web.Reception
{
    /// <summary>
    /// ChangRoom1 的摘要说明
    /// </summary>
    public class ChangRoom1 : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
           // context.Response.Write("Hello World");
           
            //如果是原来的客房客户全都换房,这把原客房做空闲更新操作,更新入住客房信息
            //如果只是部分客户换房,则在原客房更新客户信息,新客房做插入操作
            Model.tbRoomRecord model = new Model.tbRoomRecord();
            Model.tbRoomRecord newModel = new Model.tbRoomRecord();
            BLL.tbRoomRecord bll = new BLL.tbRoomRecord();


            List<Model.tbRoomRecord> list = new List<Model.tbRoomRecord>();
            string strValues = context.Request.Form["selValues"].ToString();
            Model.tbRoom modelRoom = new BLL.tbRoom().GetModel(Convert.ToInt32(context.Request.Form["newRoomId"]));
            try
            {
                if (modelRoom != null)
                {
                    if (!string.IsNullOrEmpty(strValues)) //部分客户换房
                    {
                        string[] arr = strValues.Split('|');
                        for (int i = 0; i < arr.Length; i++)
                        {
                            string[] _arr = arr[i].Split(',');
                            model.R_ID = Convert.ToInt32(_arr[0]);
                            model.RR_Name = _arr[1];
                            model.CT_ID = Convert.ToInt32(_arr[2]);
                            model.RR_CredentialsID = _arr[3];
                            model.H_Account = "admin";
                            newModel = bll.GetListLeftJoinRoomTypeAndRoomState(model)[0];
                            newModel.R_ID = modelRoom.R_ID;
                            model.RS_ID = 3;//空闲
                            newModel.RS_ID = 4;//入住
                            newModel.RR_Deposit = Convert.ToDouble(context.Request.Form["deposit"]);
                            newModel.RR_StartTime = Convert.ToDateTime(context.Request.Form["starttime"]);

                            // Model.tbRoom modelRoom = new BLL.tbRoom().GetModel(newModel.R_ID);


                            newModel.R_RoomID = modelRoom.R_RoomID;
                            newModel.RT_ID = modelRoom.RT_ID;
                            newModel.R_BedNumber = modelRoom.R_BedNumber;
                            newModel.R_Price = modelRoom.R_Price;


                            list.Add(newModel);
后面还有 41 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。