当前位置: 首页>>代码示例>>C#>>正文


C# Entity.APPContentEntity类代码示例

本文整理汇总了C#中HotelVp.CMS.Domain.Entity.APPContentEntity的典型用法代码示例。如果您正苦于以下问题:C# APPContentEntity类的具体用法?C# APPContentEntity怎么用?C# APPContentEntity使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


APPContentEntity类属于HotelVp.CMS.Domain.Entity命名空间,在下文中一共展示了APPContentEntity类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: InsertConsultRoomHistory

        public static int InsertConsultRoomHistory(APPContentEntity APPContentEntity)
        {
            string IsWriteLog = ConfigurationManager.AppSettings["IsWriteLog"].ToString();
            if ("0".Equals(IsWriteLog))
            {
                return 1;
            }

            if (APPContentEntity.APPContentDBEntity.Count == 0)
            {
                return 0;
            }
            DataCommand cmd = DataCommandManager.GetDataCommand("InsertConsultRoomHistory");
            foreach (APPContentDBEntity dbParm in APPContentEntity.APPContentDBEntity)
            {
                cmd.SetParameterValue("@CityID", dbParm.CityID);
                cmd.SetParameterValue("@HotelID", dbParm.HotelID );
                cmd.SetParameterValue("@PlanDate", dbParm.PlanTime);
                cmd.SetParameterValue("@PriceCode", dbParm.PriceCode);
                cmd.SetParameterValue("@RoomCode", dbParm.RoomCode);
                cmd.SetParameterValue("@TwoPrice", dbParm.TwoPrice);
                cmd.SetParameterValue("@RoomNum", dbParm.RoomCount);
                cmd.SetParameterValue("@Status", dbParm.PlanStatus);
                cmd.SetParameterValue("@Remark", dbParm.Remark);
                cmd.SetParameterValue("@IsReserve", dbParm.IsReserve);
                cmd.SetParameterValue("@Create_User", dbParm.CreateUser);

                cmd.ExecuteNonQuery();
            }
            return 1;
        }
开发者ID:WuziyiaoKingIris20140501,项目名称:KFC,代码行数:31,代码来源:CommonDA.cs

示例2: CommonSelect

        public static APPContentEntity CommonSelect(APPContentEntity appcontentEntity)
        {
            DataSet dsResult = new DataSet();
            dsResult.Tables.Add(new DataTable());
            dsResult.Tables[0].Columns.Add(new DataColumn("cityid"));
            dsResult.Tables[0].Columns.Add(new DataColumn("cityNM"));
            try
            {
                string url = JsonRequestURLBuilder.getSearchCityUrl();
                CallWebPage callWebPage = new CallWebPage();
                string strJson = callWebPage.CallWebByURL(url, "");

                //解析json数据
                JObject o = JObject.Parse(strJson);
                //JArray jsa = (JArray)o.SelectToken("result");
                string oCityList = o.SelectToken("result").ToString();
                JArray jsa = (JArray)JsonConvert.DeserializeObject(oCityList);

                for (int i = 0; i < jsa.Count; i++)
                {
                    JObject jso = (JObject)jsa[i];
                    DataRow drRow = dsResult.Tables[0].NewRow();
                    drRow["cityid"] = JsonRequestURLBuilder.GetJsonStringValue(jso, "cityid").Trim('"');
                    drRow["cityNM"] = JsonRequestURLBuilder.GetJsonStringValue(jso, "namecn").Trim('"') + "[" + JsonRequestURLBuilder.GetJsonStringValue(jso, "nameen").Trim('"') + "]";
                    dsResult.Tables[0].Rows.Add(drRow);
                }
            }
            catch
            {

            }
            appcontentEntity.QueryResult = dsResult;
            return appcontentEntity;
        }
开发者ID:WuziyiaoKingIris20140501,项目名称:KFC,代码行数:34,代码来源:APPContentSA.cs

示例3: ApplyFullRoom

        public static APPContentEntity ApplyFullRoom(APPContentEntity appcontentEntity)
        {
            APPContentDBEntity dbParm = (appcontentEntity.APPContentDBEntity.Count > 0) ? appcontentEntity.APPContentDBEntity[0] : new APPContentDBEntity();
            Hashtable alRoom = QueryFullRoomList(appcontentEntity);
            string[] strRoomList = dbParm.RoomList.Split(',');
            string HotelID = dbParm.HotelID.Substring((dbParm.HotelID.IndexOf('[') + 1), (dbParm.HotelID.IndexOf(']') - 1));
            string RoomCode = "";
            //dbParm.HotelID, RoomCode, dbParm.PriceCode, dbParm.StartDTime, dbParm.EndDTime
            //{"roomTypeName":"单人房","roomTypeCode":"123","status":false,"isReserve":”0”}
            bool bFlag = true;
            string msg = string.Empty;
            foreach (string strRoomCode in strRoomList)
            {
                if (String.IsNullOrEmpty(strRoomCode))
                {
                    continue;
                }

                if (alRoom.Count == 0 || !alRoom.ContainsKey(strRoomCode))
                {
                    msg = msg + strRoomCode + ",";
                    bFlag = false;
                }

                RoomCode = RoomCode + "{\"roomTypeName\":\"" + APPContentDA.HotelRoomNM(HotelID, strRoomCode) + "\"," + "\"roomTypeCode\":\"" + strRoomCode + "\"," + "\"status\":" + "true" + ",\"isReserve\":\"" + "0" + "\"" + "},";
            }

            if (!bFlag)
            {
                appcontentEntity.ErrorMSG = msg;
                appcontentEntity.Result = 2;
                return appcontentEntity;
            }

            RoomCode = (RoomCode.Length > 0) ? RoomCode.Substring(0, RoomCode.Length - 1) : RoomCode;
            string DataString = "{\"moneyType\":\"" + "CHY" + "\"," + "\"hotelId\":\"" + HotelID + "\"," + "\"rateCode\":\"" + dbParm.PriceCode + "\"," + "\"roomNum\":" + "0" + "," + "\"whatDay\":\"" + "1,2,3,4,5,6,7" + "\"," + "\"beginDate\":\"" + dbParm.StartDTime + "\"," + "\"endDate\":\"" + dbParm.EndDTime + "\"," + "\"lmroom\":[" + RoomCode + "]," + "\"updateUser\":\"" + dbParm.UpdateUser + "\"," + "\"platformCode\":\"" + "CMS" + "\"}";

            string HotelFullRoomUrl = JsonRequestURLBuilder.applyHotelFullRoomV2();

            string strHotelFullRoom = CommonCallWebUrl(HotelFullRoomUrl + DataString);

            JObject oHotelFullRoom = JObject.Parse(strHotelFullRoom);

            if ("success".Equals(JsonRequestURLBuilder.GetJsonStringValue(oHotelFullRoom, "result").Trim('"')))
            {
                appcontentEntity.Result = 1;
            }
            else
            {
                string ErrorMSG = JsonRequestURLBuilder.GetJsonStringValue(oHotelFullRoom, "code").Trim('"');
                appcontentEntity.ErrorMSG = ("1001".Equals(ErrorMSG)) ? "酒店满房标记失败   指定的房型在该时间区间内存在无销售计划,请确认!" : "";
                appcontentEntity.Result = 3;
            }

            return appcontentEntity;
        }
开发者ID:WuziyiaoKingIris20140501,项目名称:KFC,代码行数:56,代码来源:APPContentV2SA.cs

示例4: BatchUpdatePlan

        /// <summary>
        /// 房态控制 --  批量更新计划的接口  type:1 满房、2 关房、3 开房
        /// </summary>
        /// <param name="appcontentEntity"></param>
        /// <returns></returns>
        public static APPContentEntity BatchUpdatePlan(APPContentEntity appcontentEntity)
        {
            appcontentEntity.LogMessages.MsgType = MessageType.INFO;
            appcontentEntity.LogMessages.Content = _nameSpaceClass + "BatchUpdatePlan";
            LoggerHelper.LogWriter(appcontentEntity.LogMessages);

            try
            {
                return HotelInfoSA.BatchUpdatePlan(appcontentEntity);
            }
            catch (Exception ex)
            {
                appcontentEntity.LogMessages.MsgType = MessageType.ERROR;
                appcontentEntity.LogMessages.Content = _nameSpaceClass + "BatchUpdatePlan  Error: " + ex.Message;
                LoggerHelper.LogWriter(appcontentEntity.LogMessages);
                throw ex;
            }
        }
开发者ID:WuziyiaoKingIris20140501,项目名称:KFC,代码行数:23,代码来源:HotelInfoBP.cs

示例5: InsertConsultRoomHistory

        public static int InsertConsultRoomHistory(APPContentEntity APPContentEntity)
        {
            APPContentEntity.LogMessages.MsgType = MessageType.INFO;
            APPContentEntity.LogMessages.Content = _nameSpaceClass + "InsertConsultRoomHistory";
            LoggerHelper.LogWriter(APPContentEntity.LogMessages);

            try
            {
                return CommonDA.InsertConsultRoomHistory(APPContentEntity);
            }
            catch (Exception ex)
            {
                APPContentEntity.LogMessages.MsgType = MessageType.ERROR;
                APPContentEntity.LogMessages.Content = _nameSpaceClass + "InsertConsultRoomHistory  Error: " + ex.Message;
                LoggerHelper.LogWriter(APPContentEntity.LogMessages);
                throw ex;
            }
        }
开发者ID:WuziyiaoKingIris20140501,项目名称:KFC,代码行数:18,代码来源:CommonBP.cs

示例6: ApplyUnFullRoom

        public static APPContentEntity ApplyUnFullRoom(APPContentEntity appcontentEntity)
        {
            appcontentEntity.LogMessages.MsgType = MessageType.INFO;
            appcontentEntity.LogMessages.Content = _nameSpaceClass + "ApplyUnFullRoom";
            LoggerHelper.LogWriter(appcontentEntity.LogMessages);

            try
            {
                return APPContentV2SA.ApplyUnFullRoom(appcontentEntity);
            }
            catch (Exception ex)
            {
                appcontentEntity.LogMessages.MsgType = MessageType.ERROR;
                appcontentEntity.LogMessages.Content = _nameSpaceClass + "ApplyUnFullRoom  Error: " + ex.Message;
                LoggerHelper.LogWriter(appcontentEntity.LogMessages);
                throw ex;
            }
        }
开发者ID:WuziyiaoKingIris20140501,项目名称:KFC,代码行数:18,代码来源:APPContentBP.cs

示例7: BatchUpdatePlan

        /// <summary>
        /// 房态控制 --  批量更新计划的接口  type:1 满房、2 关房、3 开房
        /// </summary>
        /// <param name="appcontentEntity"></param>
        /// <returns></returns>
        public static APPContentEntity BatchUpdatePlan(APPContentEntity appcontentEntity)
        {
            APPContentDBEntity dbParm = (appcontentEntity.APPContentDBEntity.Count > 0) ? appcontentEntity.APPContentDBEntity[0] : new APPContentDBEntity();
            string DataString = "{\"hotelId\":\"" + dbParm.HotelID + "\",\"whatDay\":\"1,2,3,4,5,6,7\",\"beginDate\":\"" + dbParm.StartDTime + "\",\"endDate\":\"" + dbParm.EndDTime + "\",\"operator\":\"" + dbParm.UpdateUser + "\",\"type\":\"" + dbParm.TypeID + "\",\"priceCodeRoom\":[{\"priceCode\":\"LMBAR\",\"roomCode\":\"" + dbParm.LmbarRoomCode + "\"},{\"priceCode\":\"LMBAR2\",\"roomCode\":\"" + dbParm.Lmbar2RoomCode + "\"}]}";

            string HotelFullRoomUrl = JsonRequestURLBuilder.BatchUpdatePlan();

            CallWebPage callWebPage = new CallWebPage();
            string strHotelFullRoom = callWebPage.CallWebByURL(HotelFullRoomUrl, DataString);

            JObject oHotelFullRoom = JObject.Parse(strHotelFullRoom);

            if ("200".Equals(JsonRequestURLBuilder.GetJsonStringValue(oHotelFullRoom, "code").Trim('"')))
            {
                appcontentEntity.Result = 1;
            }
            else
            {
                appcontentEntity.Result = 2;
            }

            return appcontentEntity;
        }
开发者ID:WuziyiaoKingIris20140501,项目名称:KFC,代码行数:28,代码来源:HotelInfoSA.cs

示例8: GetFullRoomHistoryList

        public static APPContentEntity GetFullRoomHistoryList(APPContentEntity appcontentEntity)
        {
            appcontentEntity.LogMessages.MsgType = MessageType.INFO;
            appcontentEntity.LogMessages.Content = _nameSpaceClass + "GetFullRoomHistoryList";
            LoggerHelper.LogWriter(appcontentEntity.LogMessages);

            try
            {
                return APPContentDA.GetFullRoomHistoryList(appcontentEntity); //APPContentDA.CommonSelect(appcontentEntity);
            }
            catch (Exception ex)
            {
                appcontentEntity.LogMessages.MsgType = MessageType.ERROR;
                appcontentEntity.LogMessages.Content = _nameSpaceClass + "GetFullRoomHistoryList  Error: " + ex.Message;
                LoggerHelper.LogWriter(appcontentEntity.LogMessages);
                throw ex;
            }
        }
开发者ID:WuziyiaoKingIris20140501,项目名称:KFC,代码行数:18,代码来源:APPContentBP.cs

示例9: GetHotelFogList

        public static APPContentEntity GetHotelFogList(APPContentEntity appcontentEntity)
        {
            appcontentEntity.LogMessages.MsgType = MessageType.INFO;
            appcontentEntity.LogMessages.Content = _nameSpaceClass + "GetHotelFogList";
            LoggerHelper.LogWriter(appcontentEntity.LogMessages);

            try
            {
                DataSet dsHotel = APPContentDA.GetHotelFogList(appcontentEntity).QueryResult;
                ArrayList alIgnore = new ArrayList();
                DataSet dsRestult = new DataSet();
                dsRestult.Tables.Add(new DataTable());
                dsRestult.Tables[0].Columns.Add("HOTELID");
                dsRestult.Tables[0].Columns.Add("HOTELNM");
                dsRestult.Tables[0].Columns.Add("TYPEID");
                dsRestult.Tables[0].Columns.Add("TYPENM");
                dsRestult.Tables[0].Columns.Add("HVPVAL");
                dsRestult.Tables[0].Columns.Add("HUBVAL");
                string desc = "";
                string desc_f = "";

                foreach (DataRow drHotel in dsHotel.Tables[0].Rows)
                {
                    alIgnore = APPContentDA.GetHotelCompare(drHotel["HOTELID"].ToString());
                    if (!alIgnore.Contains("HOTELNMZH") && !drHotel["HOTELNMZH"].ToString().Trim().Equals(drHotel["HOTELNMZH_F"].ToString().Trim()))
                    {
                        DataRow drErNm = dsRestult.Tables[0].NewRow();
                        drErNm["HOTELID"] = drHotel["HOTELID"].ToString();
                        drErNm["HOTELNM"] = drHotel["HOTELNMZH"].ToString();
                        drErNm["TYPEID"] = "HOTELNMZH";
                        drErNm["TYPENM"] = "酒店名称";
                        drErNm["HVPVAL"] = drHotel["HOTELNMZH"].ToString();
                        drErNm["HUBVAL"] = drHotel["HOTELNMZH_F"].ToString();
                        dsRestult.Tables[0].Rows.Add(drErNm);
                    }

                    if (!alIgnore.Contains("HOTELNMEN") && !drHotel["HOTELNMEN"].ToString().Trim().Equals(drHotel["HOTELNMEN_F"].ToString().Trim()))
                    {
                        DataRow drErNm = dsRestult.Tables[0].NewRow();
                        drErNm["HOTELID"] = drHotel["HOTELID"].ToString();
                        drErNm["HOTELNM"] = drHotel["HOTELNMZH"].ToString();
                        drErNm["TYPEID"] = "HOTELNMEN";
                        drErNm["TYPENM"] = "酒店英文名称";
                        drErNm["HVPVAL"] = drHotel["HOTELNMEN"].ToString();
                        drErNm["HUBVAL"] = drHotel["HOTELNMEN_F"].ToString();
                        dsRestult.Tables[0].Rows.Add(drErNm);
                    }

                    if (!alIgnore.Contains("FOGSTATUS") && !drHotel["FOGSTATUS"].ToString().Trim().Equals(drHotel["FOGSTATUS_F"].ToString().Trim()))
                    {
                        DataRow drErNm = dsRestult.Tables[0].NewRow();
                        drErNm["HOTELID"] = drHotel["HOTELID"].ToString();
                        drErNm["HOTELNM"] = drHotel["HOTELNMZH"].ToString();
                        drErNm["TYPEID"] = "FOGSTATUS";
                        drErNm["TYPENM"] = "FOG酒店上下线状态";
                        drErNm["HVPVAL"] = drHotel["FOGSTATUS"].ToString();
                        drErNm["HUBVAL"] = drHotel["FOGSTATUS_F"].ToString();
                        dsRestult.Tables[0].Rows.Add(drErNm);
                    }

                    if (!alIgnore.Contains("CITY") && !drHotel["CITY"].ToString().Trim().Equals(drHotel["CITY_F"].ToString().Trim()))
                    {
                        DataRow drErNm = dsRestult.Tables[0].NewRow();
                        drErNm["HOTELID"] = drHotel["HOTELID"].ToString();
                        drErNm["HOTELNM"] = drHotel["HOTELNMZH"].ToString();
                        drErNm["TYPEID"] = "CITY";
                        drErNm["TYPENM"] = "酒店所在城市";
                        drErNm["HVPVAL"] = drHotel["CITY"].ToString();
                        drErNm["HUBVAL"] = drHotel["CITY_F"].ToString();
                        dsRestult.Tables[0].Rows.Add(drErNm);
                    }

                    if (!alIgnore.Contains("DIAMOND") && !drHotel["DIAMOND"].ToString().Trim().Equals(drHotel["DIAMOND_F"].ToString().Trim()))
                    {
                        DataRow drErNm = dsRestult.Tables[0].NewRow();
                        drErNm["HOTELID"] = drHotel["HOTELID"].ToString();
                        drErNm["HOTELNM"] = drHotel["HOTELNMZH"].ToString();
                        drErNm["TYPEID"] = "DIAMOND";
                        drErNm["TYPENM"] = "酒店钻石级";
                        drErNm["HVPVAL"] = drHotel["DIAMOND"].ToString();
                        drErNm["HUBVAL"] = drHotel["DIAMOND_F"].ToString();
                        dsRestult.Tables[0].Rows.Add(drErNm);
                    }

                    if (!alIgnore.Contains("STAR") && !drHotel["STAR"].ToString().Trim().Equals(drHotel["STAR_F"].ToString().Trim()))
                    {
                        DataRow drErNm = dsRestult.Tables[0].NewRow();
                        drErNm["HOTELID"] = drHotel["HOTELID"].ToString();
                        drErNm["HOTELNM"] = drHotel["HOTELNMZH"].ToString();
                        drErNm["TYPEID"] = "STAR";
                        drErNm["TYPENM"] = "酒店星级";
                        drErNm["HVPVAL"] = drHotel["STAR"].ToString();
                        drErNm["HUBVAL"] = drHotel["STAR_F"].ToString();
                        dsRestult.Tables[0].Rows.Add(drErNm);
                    }

                    if (!alIgnore.Contains("OPENDT") && !drHotel["OPENDT"].ToString().Trim().Equals(drHotel["OPENDT_F"].ToString().Trim()))
                    {
                        DataRow drErNm = dsRestult.Tables[0].NewRow();
                        drErNm["HOTELID"] = drHotel["HOTELID"].ToString();
//.........这里部分代码省略.........
开发者ID:WuziyiaoKingIris20140501,项目名称:KFC,代码行数:101,代码来源:APPContentBP.cs

示例10: ExportOrderSettleMangeList

        public static APPContentEntity ExportOrderSettleMangeList(APPContentEntity appcontentEntity)
        {
            appcontentEntity.LogMessages.MsgType = MessageType.INFO;
            appcontentEntity.LogMessages.Content = _nameSpaceClass + "ExportOrderSettleMangeList";
            LoggerHelper.LogWriter(appcontentEntity.LogMessages);

            try
            {
                return APPContentDA.ExportOrderSettleMangeList(appcontentEntity);
            }
            catch (Exception ex)
            {
                appcontentEntity.LogMessages.MsgType = MessageType.ERROR;
                appcontentEntity.LogMessages.Content = _nameSpaceClass + "ExportOrderSettleMangeList  Error: " + ex.Message;
                LoggerHelper.LogWriter(appcontentEntity.LogMessages);
                throw ex;
            }
        }
开发者ID:WuziyiaoKingIris20140501,项目名称:KFC,代码行数:18,代码来源:APPContentBP.cs

示例11: GetCoreHotelGroupDetail

        public static APPContentEntity GetCoreHotelGroupDetail(APPContentEntity appcontentEntity)
        {
            appcontentEntity.LogMessages.MsgType = MessageType.INFO;
            appcontentEntity.LogMessages.Content = _nameSpaceClass + "GetCoreHotelGroupDetail";
            LoggerHelper.LogWriter(appcontentEntity.LogMessages);

            try
            {
                return APPContentDA.GetCoreHotelGroupDetail(appcontentEntity);
            }
            catch (Exception ex)
            {
                appcontentEntity.LogMessages.MsgType = MessageType.ERROR;
                appcontentEntity.LogMessages.Content = _nameSpaceClass + "GetCoreHotelGroupDetail  Error: " + ex.Message;
                LoggerHelper.LogWriter(appcontentEntity.LogMessages);
                throw ex;
            }
        }
开发者ID:WuziyiaoKingIris20140501,项目名称:KFC,代码行数:18,代码来源:APPContentBP.cs

示例12: GetConsultRoomHistoryList

        public static APPContentEntity GetConsultRoomHistoryList(APPContentEntity APPContentEntity)
        {
            APPContentDBEntity dbParm = (APPContentEntity.APPContentDBEntity.Count > 0) ? APPContentEntity.APPContentDBEntity[0] : new APPContentDBEntity();
            DataCommand cmd = DataCommandManager.GetDataCommand("GetConsultRoomHistoryList");
            cmd.SetParameterValue("@CityID", dbParm.CityID);
            cmd.SetParameterValue("@HotelID", dbParm.HotelID);
            cmd.SetParameterValue("@PriceCode", dbParm.PriceCode);
            cmd.SetParameterValue("@RoomCode", dbParm.RoomCode);
            cmd.SetParameterValue("@PlanDate", dbParm.PlanDTime);
            APPContentEntity.QueryResult = cmd.ExecuteDataSet();

            return APPContentEntity;
        }
开发者ID:WuziyiaoKingIris20140501,项目名称:KFC,代码行数:13,代码来源:HotelInfoDA.cs

示例13: UpdateHotelCompareGridBatch

        public static int UpdateHotelCompareGridBatch(APPContentEntity appcontentEntity)
        {
            appcontentEntity.LogMessages.MsgType = MessageType.INFO;
            appcontentEntity.LogMessages.Content = _nameSpaceClass + "UpdateHotelCompareGridBatch";
            LoggerHelper.LogWriter(appcontentEntity.LogMessages);

            try
            {
                return APPContentDA.UpdateHotelCompareGridBatch(appcontentEntity);
            }
            catch (Exception ex)
            {
                appcontentEntity.LogMessages.MsgType = MessageType.ERROR;
                appcontentEntity.LogMessages.Content = _nameSpaceClass + "UpdateHotelCompareGridBatch  Error: " + ex.Message;
                LoggerHelper.LogWriter(appcontentEntity.LogMessages);
                throw ex;
            }
        }
开发者ID:WuziyiaoKingIris20140501,项目名称:KFC,代码行数:18,代码来源:APPContentBP.cs

示例14: GetHistoryRemarkByJson

    public static string GetHistoryRemarkByJson(string CityID, string HotelID, string PriceCode, string RoomCode, string PlanDTime)
    {
        APPContentEntity _appcontentEntity = new APPContentEntity();
        _appcontentEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
        _appcontentEntity.LogMessages.Userid = UserSession.Current.UserAccount;
        _appcontentEntity.LogMessages.Username = UserSession.Current.UserDspName;
        _appcontentEntity.LogMessages.IpAddress = UserSession.Current.UserIP;

        _appcontentEntity.APPContentDBEntity = new List<APPContentDBEntity>();
        APPContentDBEntity appcontentDBEntity = new APPContentDBEntity();

        appcontentDBEntity.CityID = CityID;
        appcontentDBEntity.HotelID = HotelID;
        appcontentDBEntity.PriceCode = PriceCode;
        appcontentDBEntity.RoomCode = RoomCode;
        appcontentDBEntity.PlanDTime = DateTime.Parse(PlanDTime).ToShortDateString();

        _appcontentEntity.APPContentDBEntity.Add(appcontentDBEntity);
        string json = "";
        if (!CityID.Equals("undefined"))
        {
            DataSet dsResult = HotelInfoBP.GetConsultRoomHistoryList(_appcontentEntity).QueryResult;
            try
            {
                if (dsResult.Tables[0] != null && dsResult.Tables[0].Rows.Count > 0)
                {
                    json = ToJson(dsResult.Tables[0]);
                }
                else
                {
                    json = "{\"d\":\"[]\"}";
                }
            }
            catch (Exception ex)
            {
                json = "{\"d\":\"[]\"}";
            }
        }
        return json;
    }
开发者ID:WuziyiaoKingIris20140501,项目名称:KFC,代码行数:40,代码来源:HotelConsultingRoomAllAsyncTable.aspx.cs

示例15: btnPlanCloseRoom

    /// <summary>
    /// 计划关房(批量操作 关闭计划)
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    public void btnPlanCloseRoom(string remark, string status, bool isRenew)
    {
        DataTable dtPlanLMBAR2 = new DataTable();
        DataTable dtPlanLMBAR = new DataTable();
        string hotelId = this.HidPid.Value;//酒店ID
        string dateSE = this.HidMarkFullRoom.Value;//起止日期

        #region
        APPContentEntity _appcontentEntity = new APPContentEntity();
        _appcontentEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
        _appcontentEntity.LogMessages.Userid = UserSession.Current.UserAccount;
        _appcontentEntity.LogMessages.Username = UserSession.Current.UserDspName;
        _appcontentEntity.LogMessages.IpAddress = UserSession.Current.UserIP;

        CommonEntity _commonEntity = new CommonEntity();
        _commonEntity.CommonDBEntity = new List<CommonDBEntity>();
        _commonEntity.LogMessages = new HotelVp.Common.Logger.LogMessage();
        _commonEntity.LogMessages.IpAddress = UserSession.Current.UserIP;
        _commonEntity.LogMessages.Username = UserSession.Current.UserDspName;
        _commonEntity.LogMessages.Userid = UserSession.Current.UserAccount;
        CommonDBEntity commonDBEntity = new CommonDBEntity();

        _appcontentEntity.APPContentDBEntity = new List<APPContentDBEntity>();
        APPContentDBEntity appcontentDBEntity = new APPContentDBEntity();

        bool IsFlag = false;
        if (!string.IsNullOrEmpty(dateSE))
        {

            DataTable dtPlan = GetBindLmbarPlanList(this.planStartDate.Value, this.planEndDate.Value, this.HidPid.Value).Tables[0];//总计划
            dtPlanLMBAR2 = dtPlan.Clone();
            dtPlanLMBAR = dtPlan.Clone();
            DataRow[] drPlanLMBAR2 = dtPlan.Select("RATECODE='LMBAR2'"); //LMBAR2计划
            for (int i = 0; i < drPlanLMBAR2.Length; i++)
            {
                dtPlanLMBAR2.ImportRow(drPlanLMBAR2[i]);
            }
            DataRow[] drPlanLMBAR = dtPlan.Select("RATECODE='LMBAR'"); //LMBAR计划
            for (int i = 0; i < drPlanLMBAR.Length; i++)
            {
                dtPlanLMBAR.ImportRow(drPlanLMBAR[i]);
            }

            string[] datas = dateSE.Split(',');
            for (int i = 0; i < datas.Length; i++)
            {
                if (!string.IsNullOrEmpty(datas[i].ToString()))
                {
                    if (DateTime.Parse(datas[i].ToString()).ToShortDateString() == System.DateTime.Now.ToShortDateString())
                    {
                        IsFlag = true;
                    }

                    string effDate = datas[i].ToString().Replace("/", "-");
                    #region
                    for (int l = 0; l < this.HidLastHotelRoomListLMBAR2.Value.Split(',').Length; l++)
                    {
                        DataRow[] rowsLmbar2 = dtPlanLMBAR2.Select("EFFECTDATESTRING='" + DateTime.Parse(effDate).ToString("yyyy-MM-dd") + "' and ROOMTYPECODE='" + this.HidLastHotelRoomListLMBAR2.Value.Split(',')[l].ToString() + "'");
                        for (int j = 0; j < rowsLmbar2.Length; j++)
                        {
                            if (!string.IsNullOrEmpty(rowsLmbar2[j]["RoomNum"].ToString()) && rowsLmbar2[j]["RoomNum"].ToString().ToLower() != "null")
                            {
                                //城市ID
                                appcontentDBEntity.CityID = this.HidCityID.Value;
                                //酒店ID
                                appcontentDBEntity.HotelID = hotelId;
                                //酒店名称
                                appcontentDBEntity.HotelNM = this.HidPcode.Value;
                                //PlanDate
                                appcontentDBEntity.PlanTime = DateTime.Parse(effDate).ToShortDateString();
                                //价格代码
                                appcontentDBEntity.PriceCode = rowsLmbar2[j]["RATECODE"].ToString();
                                //价格
                                appcontentDBEntity.TwoPrice = rowsLmbar2[j]["TWOPRICE"].ToString();
                                //状态     开启 关闭
                                //appcontentDBEntity.PlanStatus = rowsLmbar2[j]["STATUS"].ToString();
                                appcontentDBEntity.PlanStatus = status == "" ? rowsLmbar2[j]["STATUS"].ToString() : status;
                                appcontentDBEntity.RoomCount = rowsLmbar2[j]["ROOMNUM"].ToString();
                                appcontentDBEntity.IsReserve = rowsLmbar2[j]["ISRESERVE"].ToString();
                                //房型名称
                                appcontentDBEntity.RoomName = rowsLmbar2[j]["ROOMTYPENAME"].ToString();
                                //房型Code
                                appcontentDBEntity.RoomCode = rowsLmbar2[j]["ROOMTYPECODE"].ToString();

                                appcontentDBEntity.WeekList = "1,2,3,4,5,6,7";
                                //备注
                                appcontentDBEntity.Remark = remark;
                                //操作人
                                appcontentDBEntity.CreateUser = UserSession.Current.UserAccount;

                                _appcontentEntity.APPContentDBEntity.Add(appcontentDBEntity);
                                CommonBP.InsertConsultRoomHistory(_appcontentEntity);
                                _appcontentEntity.APPContentDBEntity.Clear();
                            }
                        }
//.........这里部分代码省略.........
开发者ID:WuziyiaoKingIris20140501,项目名称:KFC,代码行数:101,代码来源:HotelConsultingRoomAllAsyncTable.aspx.cs


注:本文中的HotelVp.CMS.Domain.Entity.APPContentEntity类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。