public static void AutoHotelPlaning() { DateTime dtBegin = new DateTime(); dtBegin = System.DateTime.Now; AutoHotelPlanEntity _autohotelplanEntity = new AutoHotelPlanEntity(); CommonEntity _commonEntity = new CommonEntity(); _autohotelplanEntity.LogMessages = new HotelVp.Common.Logger.LogMessage(); _autohotelplanEntity.LogMessages.Userid = "JOB System"; _autohotelplanEntity.LogMessages.Username = "******"; _autohotelplanEntity.AutoHotelPlanDBEntity = new List<AutoHotelPlanDBEntity>(); AutoHotelPlanDBEntity appcontentDBEntity = new AutoHotelPlanDBEntity(); _autohotelplanEntity.AutoHotelPlanDBEntity.Add(appcontentDBEntity); Console.WriteLine("酒店销售计划JOB自动运行开始"); int iCount = AutoSelect(_autohotelplanEntity); Console.WriteLine("酒店销售计划JOB自动运行 执行记录数:" + iCount.ToString()); //Console.WriteLine("发送邮件开始"); //bool bResult = SendMailExpress(dsResult); //string strResult = "失败"; //if (bResult) //{ // strResult = "成功"; //} //else //{ // Thread.Sleep(5000); //} //Console.WriteLine("发送邮件结束 结果:" + strResult); DateTime dtEnd = new DateTime(); dtEnd = System.DateTime.Now; Console.WriteLine(dtEnd - dtBegin); }
private static string ApplySalesRoomService(DataRow drRow, string Type) { AutoHotelPlanEntity _autohotelplanEntity = new AutoHotelPlanEntity(); _autohotelplanEntity.LogMessages = new HotelVp.Common.Logger.LogMessage(); _autohotelplanEntity.LogMessages.Userid = "JOB System"; _autohotelplanEntity.LogMessages.Username = drRow["Create_User"].ToString().Trim(); _autohotelplanEntity.AutoHotelPlanDBEntity = new List<AutoHotelPlanDBEntity>(); AutoHotelPlanDBEntity appcontentDBEntity = new AutoHotelPlanDBEntity(); appcontentDBEntity.HotelID = drRow["HOTEL_ID"].ToString().Trim(); appcontentDBEntity.PriceCode = drRow["RATE_CODE"].ToString().Trim(); appcontentDBEntity.RoomCode = drRow["ROOM_TYPE_CODE"].ToString().Trim(); appcontentDBEntity.RoomName = drRow["ROOM_TYPE_NAME"].ToString().Trim(); appcontentDBEntity.StartDTime = drRow["StartDtime"].ToString().Trim(); appcontentDBEntity.EndDTime = drRow["EndDtime"].ToString().Trim(); appcontentDBEntity.EffHour = drRow["EFFECT_HOUR"].ToString().Trim(); appcontentDBEntity.WeekList = drRow["Week_List"].ToString().Trim(); appcontentDBEntity.Note1 = drRow["GUAID"].ToString().Trim(); appcontentDBEntity.Note2 = drRow["CXLID"].ToString().Trim(); appcontentDBEntity.OnePrice = drRow["ONE_PRICE"].ToString().Trim(); appcontentDBEntity.TwoPrice = drRow["TWO_PRICE"].ToString().Trim(); appcontentDBEntity.ThreePrice = drRow["THREE_PRICE"].ToString().Trim(); appcontentDBEntity.FourPrice = drRow["FOUR_PRICE"].ToString().Trim(); appcontentDBEntity.BedPrice = drRow["ATTN_PRICE"].ToString().Trim(); appcontentDBEntity.BreakfastNum = drRow["BREAKFAST_NUM"].ToString().Trim(); appcontentDBEntity.BreakPrice = drRow["EACH_BREAKFAST_PRICE"].ToString().Trim(); appcontentDBEntity.IsNetwork = drRow["IS_NETWORK"].ToString().Trim(); appcontentDBEntity.Offsetval = drRow["OFFSETVAL"].ToString().Trim(); appcontentDBEntity.Offsetunit = drRow["OFFSETUNIT"].ToString().Trim(); appcontentDBEntity.RoomStatus = drRow["STATUS"].ToString().Trim(); appcontentDBEntity.RoomCount = drRow["ROOM_NUM"].ToString().Trim(); appcontentDBEntity.IsReserve = drRow["IS_RESERVE"].ToString().Trim(); appcontentDBEntity.UpdateUser = drRow["Create_User"].ToString().Trim(); appcontentDBEntity.TypeID = Type; _autohotelplanEntity.AutoHotelPlanDBEntity.Add(appcontentDBEntity); _autohotelplanEntity = AutoHotelPlanSA.ApplySalesPlan(_autohotelplanEntity); return _autohotelplanEntity.ErrorMSG; }
private static Hashtable ApplySalesRoomServiceList(ArrayList alHotelList) { AutoHotelPlanEntity _autohotelplanEntity = new AutoHotelPlanEntity(); _autohotelplanEntity.LogMessages = new HotelVp.Common.Logger.LogMessage(); _autohotelplanEntity.LogMessages.Userid = "JOB System"; _autohotelplanEntity.LogMessages.Username = "******"; _autohotelplanEntity.AutoHotelPlanDBEntity = new List<AutoHotelPlanDBEntity>(); for (int i = 0; i < alHotelList.Count; i++) { DataRow drRow = (DataRow)alHotelList[i]; AutoHotelPlanDBEntity appcontentDBEntity = new AutoHotelPlanDBEntity(); appcontentDBEntity.HotelID = drRow["HOTEL_ID"].ToString().Trim(); appcontentDBEntity.PriceCode = drRow["RATE_CODE"].ToString().Trim(); appcontentDBEntity.RoomCode = drRow["ROOM_TYPE_CODE"].ToString().Trim(); appcontentDBEntity.RoomName = drRow["ROOM_TYPE_NAME"].ToString().Trim(); appcontentDBEntity.StartDTime = drRow["StartDtime"].ToString().Trim(); appcontentDBEntity.EndDTime = drRow["EndDtime"].ToString().Trim(); appcontentDBEntity.EffHour = drRow["EFFECT_HOUR"].ToString().Trim(); appcontentDBEntity.WeekList = drRow["Week_List"].ToString().Trim(); appcontentDBEntity.Note1 = drRow["GUAID"].ToString().Trim(); appcontentDBEntity.Note2 = drRow["CXLID"].ToString().Trim(); appcontentDBEntity.OnePrice = drRow["ONE_PRICE"].ToString().Trim(); appcontentDBEntity.TwoPrice = drRow["TWO_PRICE"].ToString().Trim(); appcontentDBEntity.ThreePrice = drRow["THREE_PRICE"].ToString().Trim(); appcontentDBEntity.FourPrice = drRow["FOUR_PRICE"].ToString().Trim(); appcontentDBEntity.BedPrice = drRow["ATTN_PRICE"].ToString().Trim(); appcontentDBEntity.NetPrice = drRow["NET_PRICE"].ToString().Trim(); appcontentDBEntity.BreakfastNum = drRow["BREAKFAST_NUM"].ToString().Trim(); appcontentDBEntity.BreakPrice = drRow["EACH_BREAKFAST_PRICE"].ToString().Trim(); appcontentDBEntity.IsNetwork = drRow["IS_NETWORK"].ToString().Trim(); appcontentDBEntity.Offsetval = drRow["OFFSETVAL"].ToString().Trim(); appcontentDBEntity.Offsetunit = drRow["OFFSETUNIT"].ToString().Trim(); appcontentDBEntity.RoomStatus = drRow["STATUS"].ToString().Trim(); appcontentDBEntity.RoomCount = drRow["ROOM_NUM"].ToString().Trim(); appcontentDBEntity.IsReserve = drRow["IS_RESERVE"].ToString().Trim(); appcontentDBEntity.UpdateUser = drRow["Create_User"].ToString().Trim(); appcontentDBEntity.TypeID = drRow["Type"].ToString().Trim(); appcontentDBEntity.HPID = drRow["HPID"].ToString().Trim(); appcontentDBEntity.Supplier = drRow["SOURCE"].ToString().Trim(); _autohotelplanEntity.AutoHotelPlanDBEntity.Add(appcontentDBEntity); } Hashtable htResult = new Hashtable(); htResult = AutoHotelPlanSA.ApplySalesPlanList(_autohotelplanEntity); return htResult; }