public bool DeactivateHotel(Guid Acco_Id, string Remark) { bool ret = false; MDMSVC.DC_Accomodation_UpdateStatus_RQ obj = new MDMSVC.DC_Accomodation_UpdateStatus_RQ(); obj.Accommodation_Id = Acco_Id; obj.Status = false; obj.Edit_Date = DateTime.Now; obj.Edit_User = System.Web.HttpContext.Current.User.Identity.Name; if (AccSvc.UpdateHotelDetailStatus(obj)) { MDMSVC.DC_Accommodation_Status AS = new MDMSVC.DC_Accommodation_Status(); AS.Accommodation_Status_Id = Guid.NewGuid(); AS.Accommodation_Id = Acco_Id; AS.CompanyMarket = "All"; AS.DeactivationReason = Remark; AS.From = DateTime.ParseExact(DateTime.Now.ToString("dd/MM/yyyy"), "dd/MM/yyyy", System.Globalization.CultureInfo.InvariantCulture); AS.To = DateTime.ParseExact("31/12/2099", "dd/MM/yyyy", System.Globalization.CultureInfo.InvariantCulture); AS.Status = "INACTIVE"; AS.IsActive = true; AS.Edit_Date = DateTime.Now; AS.Edit_User = System.Web.HttpContext.Current.User.Identity.Name; if (AccSvc.AddHotelStatus(AS)) { ret = true; } } return(ret); }
// Update Hotel Status Info public bool UpdateHotelDetailStatus(MDMSVC.DC_Accomodation_UpdateStatus_RQ HotelData) { object result = null; ServiceConnection.MDMSvcProxy.PostData(ConfigurationManager.AppSettings["Accomodation_UpdateDetailStatusURI"], HotelData, typeof(MDMSVC.DC_Accomodation_UpdateStatus_RQ), typeof(bool), out result); return((bool)result); }