public bool Delete(TB_TypeHotelChainExt model, ref string Msg, Controller ctrl) { bool status = true; using (DBEntities DE = new DBEntities()) { var DepObj = DE.TB_TypeHotelChain.Where(x => x.ID == model.ID).FirstOrDefault(); DE.TB_TypeHotelChain.Remove(DepObj); DE.SaveChanges(); } return status; }
public bool Create(TB_TypeHotelChainExt model, ref string Msg, Controller ctrl) { bool status = true; DBEntities insertentity = new DBEntities(); TB_TypeHotelChain DepObj = new TB_TypeHotelChain(); DepObj.Name = model.Name; DepObj.Sort = Convert.ToInt16(model.Sorts); DepObj.Active = model.Active; DepObj.OpDateTime = DateTime.Now; DepObj.OpUserID = 0; insertentity.TB_TypeHotelChain.Add(DepObj); insertentity.SaveChanges(); int id = DepObj.ID; return status; }
public bool Create(TB_AttributeHeaderExt model, ref string Msg, Controller ctrl) { bool status = true; DBEntities insertentity = new DBEntities(); TB_AttributeHeader DepObj = new TB_AttributeHeader(); // DepObj.ID = model.ID; DepObj.Code = model.Code; DepObj.Name_en = model.Name; DepObj.Sort = Convert.ToInt16(model.Sorts); DepObj.Active = model.Active; DepObj.OpDateTime = DateTime.Now; DepObj.OpUserID = Convert.ToInt64(ctrl.Session["UserID"]); insertentity.TB_AttributeHeader.Add(DepObj); insertentity.SaveChanges(); int id = DepObj.ID; return status; }
public bool Update(TB_TypeHotelChainExt model, ref string Msg, Controller ctrl) { bool status = true; using (DBEntities DE = new DBEntities()) { var DepObj = DE.TB_TypeHotelChain.Where(x => x.ID == model.ID).FirstOrDefault(); DepObj.Name = model.Name; DepObj.Sort = Convert.ToInt16(model.Sorts); DepObj.Active = model.Active; DepObj.OpDateTime = DateTime.Now; DepObj.OpUserID = 0; DepObj.Sort = Convert.ToInt16(model.Sorts); DepObj.Active = model.Active; DepObj.OpDateTime = DateTime.Now; DepObj.OpUserID = 0; DE.SaveChanges(); } return status; }
public bool Delete(MessageExt model, ref string Msg, Controller ctrl) { bool status = true; //DBEntities insertentity = new DBEntities(); //var IDParam = new SqlParameter("@ID", model.ID); //int i = insertentity.Database.ExecuteSqlCommand("B_Ex_Delete_BizTbl_Message_SP @ID", IDParam); using (DBEntities DE = new DBEntities()) { var MessageTable = DE.BizTbl_Message.Where(x => x.ID == model.ID).FirstOrDefault(); DE.BizTbl_Message.Remove(MessageTable); DE.SaveChanges(); } return status; }
public bool Create(TB_TypeHotelClassExt model, ref string Msg, Controller ctrl) { bool status = true; DBEntities insertentity = new DBEntities(); TB_TypeHotelClass DepObj = new TB_TypeHotelClass(); DepObj.Code = model.Code; DepObj.Name_en = model.Name_en; DepObj.Name_tr = model.Name_tr; DepObj.Name_de = model.Name_de; DepObj.Name_es = model.Name_es; DepObj.Name_fr = model.Name_fr; DepObj.Name_ru = model.Name_ru; DepObj.Name_it = model.Name_it; DepObj.Name_ar = model.Name_ar; DepObj.Name_ja = model.Name_ja; DepObj.Name_pt = model.Name_pt; DepObj.Name_zh = model.Name_zh; DepObj.Sort = Convert.ToInt16(model.Sorts); DepObj.Active = model.Active; DepObj.OpDateTime = DateTime.Now; DepObj.OpUserID = 0; insertentity.TB_TypeHotelClass.Add(DepObj); insertentity.SaveChanges(); int id = DepObj.ID; return status; }
public bool Create(TB_TypeSalutationExt model, ref string Msg, Controller ctrl) { bool status = true; DBEntities insertentity = new DBEntities(); TB_TypeSalutation DepObj = new TB_TypeSalutation(); DepObj.Name_en = model.Name_en; DepObj.Name_tr = model.Name_tr; DepObj.Name_de = model.Name_de; DepObj.Name_es = model.Name_es; DepObj.Name_fr = model.Name_fr; DepObj.Name_ru = model.Name_ru; DepObj.Name_it = model.Name_it; DepObj.Name_ar = model.Name_ar; DepObj.Name_ja = model.Name_ja; DepObj.Name_pt = model.Name_pt; DepObj.Name_zh = model.Name_zh; DepObj.OpDateTime = DateTime.Now; DepObj.OpUserID = 0; insertentity.TB_TypeSalutation.Add(DepObj); insertentity.SaveChanges(); int id = DepObj.ID; return status; }
public bool Delete(RegionExt model, ref string Msg, Controller ctrl) { bool status = true; using (DBEntities DE = new DBEntities()) { var RegionTable = DE.TB_Region.Where(x => x.ID == model.ID).FirstOrDefault(); DE.TB_Region.Remove(RegionTable); DE.SaveChanges(); } return status; }
public bool Create(ParameterExt model, ref string Msg, Controller ctrl) { bool status = true; DBEntities insertentity = new DBEntities(); BizTbl_Parameter MsgObj = new BizTbl_Parameter(); MsgObj.ID = model.ID; MsgObj.Code = model.Code; MsgObj.Value = model.Value; MsgObj.Description_en = model.Description; MsgObj.IsCommon = model.IsCommon; MsgObj.OpDateTime = DateTime.Now; MsgObj.OpUserID = Convert.ToInt64(ctrl.Session["UserID"]); insertentity.BizTbl_Parameter.Add(MsgObj); insertentity.SaveChanges(); int id = MsgObj.ID; return status; }
public bool Update(ParameterExt model, ref string Msg, Controller ctrl) { bool status = true; using (DBEntities DE = new DBEntities()) { var MessageTable = DE.BizTbl_Parameter.Where(x => x.ID == model.ID).FirstOrDefault(); MessageTable.Code = model.Code; MessageTable.Value = model.Value; MessageTable.Description_en = model.Description; MessageTable.IsCommon = model.IsCommon; MessageTable.OpDateTime = DateTime.Now; MessageTable.OpUserID = model.OpUserID; DE.SaveChanges(); } return status; }
public bool Update(TB_TransferExt model, ref string Msg, Controller ctrl) { bool status = true; using (DBEntities DE = new DBEntities()) { var DepObj = DE.TB_Transfer.Where(x => x.ID == model.ID).FirstOrDefault(); DepObj.BusinessPartnerID = model.BusinessPartnerID; DepObj.CostCurrencyID = model.CostCurrencyID; DepObj.CurrencyID = model.CurrencyID; DepObj.TransferPaxID = model.TransferPaxID; DepObj.DepartureRegionID = model.DepartureRegionID; DepObj.DepositCurrencyID = model.DepositCurrencyID; DepObj.TransferPeriodID = model.TransferPeriodID; DepObj.Deposit = model.Deposit; DepObj.Amount = model.Amount; DepObj.Cost = model.Amount; DepObj.HitCount = model.HitCount; DepObj.Active = model.Active; DepObj.OpDateTime = DateTime.Now; DepObj.OpUserID = 0; DE.SaveChanges(); } return status; }
public bool Create(TB_TransferExt model, ref string Msg, Controller ctrl) { bool status = true; DBEntities insertentity = new DBEntities(); TB_Transfer DepObj = new TB_Transfer(); //DepObj.ID = model.ID; DepObj.BusinessPartnerID = model.BusinessPartnerID; DepObj.CostCurrencyID = model.CostCurrencyID; DepObj.CurrencyID = model.CurrencyID; DepObj.TransferPaxID = model.TransferPaxID; DepObj.DepartureRegionID = model.DepartureRegionID; DepObj.DepositCurrencyID = model.DepositCurrencyID; DepObj.TransferPeriodID = model.TransferPeriodID; DepObj.Deposit = model.Deposit; DepObj.Amount = model.Amount; DepObj.Cost = model.Amount; DepObj.HitCount = model.HitCount; DepObj.Active = model.Active; DepObj.OpDateTime = DateTime.Now; DepObj.CreateDateTime = DateTime.Now; DepObj.OpUserID = 0; DepObj.CreateUserID = 0; insertentity.TB_Transfer.Add(DepObj); insertentity.SaveChanges(); int id = DepObj.ID; return status; }
public bool Create(TB_TypeReviewScaleExt model, ref string Msg, Controller ctrl) { bool status = true; DBEntities insertentity = new DBEntities(); TB_TypeReviewScale DepObj = new TB_TypeReviewScale(); DepObj.ID = model.ID; DepObj.Name_en = model.Name_en; DepObj.Name_tr = model.Name_tr; DepObj.Name_de = model.Name_de; DepObj.Name_es = model.Name_es; DepObj.Name_fr = model.Name_fr; DepObj.Name_ru = model.Name_ru; DepObj.Name_it = model.Name_it; DepObj.Name_ar = model.Name_ar; DepObj.Name_ja = model.Name_ja; DepObj.Name_pt = model.Name_pt; DepObj.Name_zh = model.Name_zh; DepObj.Point = Convert.ToDecimal(model.Points); DepObj.Active = model.Active; DepObj.OpDateTime = DateTime.Now; DepObj.OpUserID = 0; insertentity.TB_TypeReviewScale.Add(DepObj); insertentity.SaveChanges(); int id = DepObj.ID; return status; }
public bool Update(MessageExt model, ref string Msg, Controller ctrl) { bool status = true; using (DBEntities DE = new DBEntities()) { var MessageTable = DE.BizTbl_Message.Where(x => x.ID == model.ID).FirstOrDefault(); MessageTable.Code = model.Code; MessageTable.Description_en = model.Description_en; MessageTable.Description_tr = model.Description_tr; MessageTable.Description_de = model.Description_de; MessageTable.Description_es = model.Description_es; MessageTable.Description_fr = model.Description_fr; MessageTable.Description_ru = model.Description_ru; MessageTable.Description_it = model.Description_it; MessageTable.Description_ar = model.Description_ar; MessageTable.Description_ja = model.Description_ja; MessageTable.Description_pt = model.Description_pt; MessageTable.Description_zh = model.Description_zh; MessageTable.IsCommon = model.IsCommon; MessageTable.OpDateTime = DateTime.Now; MessageTable.OpUserID = Convert.ToInt64(ctrl.Session["UserID"]); DE.SaveChanges(); } //var IDParam = new SqlParameter("@ID", model.ID); //var CodeParam = new SqlParameter("@Code", model.Code); //var Description_trparam = new SqlParameter("@Description_tr", model.Description_tr); //var Description_enparam = new SqlParameter("@Description_en", model.Description_en); //var Description_deparam = new SqlParameter("@Description_de", model.Description_de); //var Description_esparam = new SqlParameter("@Description_es", model.Description_es); //var Description_frParam = new SqlParameter("@Description_fr", model.Description_fr); //var Description_ruparam = new SqlParameter("@Description_ru", model.Description_ru); //var Description_itparam = new SqlParameter("@Description_it", model.Description_it); //var Description_arparam = new SqlParameter("@Description_ar", model.Description_ar); //var Description_jaParam = new SqlParameter("@Description_ja", model.Description_ja); //var Description_ptParam = new SqlParameter("@Description_pt", model.Description_pt); //var Description_zhparam = new SqlParameter("@Description_zh", model.Description_zh); //var IsCommonparam = new SqlParameter("@IsCommon", model.IsCommon); //var i = updateentity.Database.ExecuteSqlCommand("B_Ex_Update_BizTbl_Message_SP @ID,@Code,@Description_tr,@Description_en,@Description_de,@Description_es,@Description_fr,@Description_ru,@Description_it,@Description_ar,@Description_ja,@Description_pt,@Description_zh,@IsCommon", IDParam, CodeParam, Description_trparam, Description_enparam, Description_deparam, Description_esparam, Description_frParam, Description_ruparam, Description_itparam, Description_itparam, Description_arparam, Description_jaParam, Description_ptParam, Description_zhparam, IsCommonparam); return status; }
public bool Delete(ParameterExt model, ref string Msg, Controller ctrl) { bool status = true; using (DBEntities DE = new DBEntities()) { var MessageTable = DE.BizTbl_Parameter.Where(x => x.ID == model.ID).FirstOrDefault(); DE.BizTbl_Parameter.Remove(MessageTable); DE.SaveChanges(); } return status; }
public bool Create(RegionExt model, ref string Msg, Controller ctrl) { bool status = true; DBEntities insertentity = new DBEntities(); TB_Region RegionTable = new TB_Region(); RegionTable.ID = model.ID; RegionTable.CountryID = Convert.ToInt32(model.CountryID); RegionTable.ParentID = Convert.ToInt64(model.ParentID); RegionTable.SecondParentID = Convert.ToInt64(model.secondParentID); RegionTable.RegionType = model.RegionType; RegionTable.SubRegionType = model.SubRegionType; RegionTable.Name = model.Name; RegionTable.NameASCII = model.NameASCII; RegionTable.Name_en = model.Name_en; RegionTable.Name_tr = model.Name_tr; RegionTable.Name_de = model.Name_de; RegionTable.Name_es = model.Name_es; RegionTable.Name_fr = model.Name_fr; RegionTable.Name_ru = model.Name_ru; RegionTable.Name_it = model.Name_it; RegionTable.Name_ar = model.Name_ar; RegionTable.Name_ja = model.Name_ja; RegionTable.Name_pt = model.Name_pt; RegionTable.Name_zh = model.Name_zh; RegionTable.Code = model.Code; RegionTable.Population = Convert.ToInt64(model.Population); RegionTable.IsIncludedInDestinationSearch = model.IsIncludedInSearch; RegionTable.IsCity = model.IsCity; RegionTable.IsPopular = model.IsPopular; RegionTable.IsFilter = model.IsFilter; RegionTable.IsMainPageDisplay = model.IsMainPageDisplay; RegionTable.MainPageDisplaySort = Convert.ToInt32(model.MainPageDisplaySort); RegionTable.HitCount = Convert.ToInt64(model.HitCount); RegionTable.Sort = Convert.ToInt16(model.Sort); RegionTable.Latitude = model.Latitude; RegionTable.Longitude = model.Longitude; RegionTable.MapZoomIndex = Convert.ToInt32(model.MapZoomIndex); RegionTable.HasCityTax = model.CityTax; RegionTable.Active = model.Active; RegionTable.OpDateTime = DateTime.Now; RegionTable.OpUserID = Convert.ToInt64(ctrl.Session["UserID"]); insertentity.TB_Region.Add(RegionTable); insertentity.SaveChanges(); return status; }
public bool Update(TB_TypeHotelBudgetExt model, ref string Msg, Controller ctrl) { bool status = true; using (DBEntities DE = new DBEntities()) { var DepObj = DE.TB_TypeHotelBudget.Where(x => x.ID == model.ID).FirstOrDefault(); DepObj.CurrencyID = model.CurrencyID; DepObj.EndValue = model.EndValue; DepObj.Margin = model.Margin; DepObj.OpDateTime = DateTime.Now; DepObj.OpUserID = 0; DE.SaveChanges(); } return status; }
public bool Update(RegionExt model, ref string Msg, Controller ctrl) { bool status = true; using (DBEntities DE = new DBEntities()) { var RegionTable = DE.TB_Region.Where(x => x.ID == model.ID).FirstOrDefault(); RegionTable.ID = model.ID; RegionTable.CountryID = Convert.ToInt32(model.CountryID); RegionTable.ParentID = Convert.ToInt64(model.ParentID); RegionTable.SecondParentID = Convert.ToInt64(model.secondParentID); RegionTable.RegionType = model.RegionType; RegionTable.SubRegionType = model.SubRegionType; RegionTable.Name = model.Name; RegionTable.NameASCII = model.NameASCII; RegionTable.Name_en = model.Name_en; RegionTable.Name_tr = model.Name_tr; RegionTable.Name_de = model.Name_de; RegionTable.Name_es = model.Name_es; RegionTable.Name_fr = model.Name_fr; RegionTable.Name_ru = model.Name_ru; RegionTable.Name_it = model.Name_it; RegionTable.Name_ar = model.Name_ar; RegionTable.Name_ja = model.Name_ja; RegionTable.Name_pt = model.Name_pt; RegionTable.Name_zh = model.Name_zh; RegionTable.Code = model.Code; RegionTable.Population = Convert.ToInt64(model.Population); RegionTable.IsIncludedInDestinationSearch = model.IsIncludedInSearch; RegionTable.IsCity = model.IsCity; RegionTable.IsPopular = model.IsPopular; RegionTable.IsFilter = model.IsFilter; RegionTable.IsMainPageDisplay = model.IsMainPageDisplay; RegionTable.MainPageDisplaySort = Convert.ToInt32(model.MainPageDisplaySort); RegionTable.HitCount = Convert.ToInt64(model.HitCount); RegionTable.Sort = Convert.ToInt16(model.Sort); RegionTable.Latitude = model.Latitude; RegionTable.Longitude = model.Longitude; RegionTable.MapZoomIndex = Convert.ToInt32(model.MapZoomIndex); RegionTable.HasCityTax = model.CityTax; RegionTable.Active = model.Active; DE.SaveChanges(); } return status; }
public bool Create(TB_TypeHotelBudgetExt model, ref string Msg, Controller ctrl) { bool status = true; DBEntities insertentity = new DBEntities(); TB_TypeHotelBudget DepObj = new TB_TypeHotelBudget(); //DepObj.ID = model.ID; DepObj.CurrencyID = model.CurrencyID; DepObj.EndValue = model.EndValue; DepObj.Margin = model.Margin; DepObj.OpDateTime = DateTime.Now; DepObj.OpUserID = 0; insertentity.TB_TypeHotelBudget.Add(DepObj); insertentity.SaveChanges(); int id = DepObj.ID; return status; }
public bool Update(TB_PromotionExt model, ref string Msg, Controller ctrl) { bool status = true; using (DBEntities DE = new DBEntities()) { var DepObj = DE.TB_Promotion.Where(x => x.ID == model.ID).FirstOrDefault(); DepObj.PartID = model.PartID; switch (CultureCode) { case "en": //ID from BizTbl_Table for this Table DepObj.Name_en = model.Name; DepObj.Description_en = model.Description; break; case "tr": DepObj.Name_tr = model.Name; DepObj.Description_tr = model.Description; break; case "de": DepObj.Name_de = model.Name; DepObj.Description_de = model.Description; break; case "es": DepObj.Name_es = model.Name; DepObj.Description_es = model.Description; break; case "fr": DepObj.Name_fr = model.Name; DepObj.Description_fr = model.Description; break; case "ru": DepObj.Name_ru = model.Name; DepObj.Description_ru = model.Description; break; case "it": DepObj.Name_it = model.Name; DepObj.Description_it = model.Description; break; case "ar": DepObj.Name_ar = model.Name; DepObj.Description_ar = model.Description; break; case "ja": DepObj.Name_ja = model.Name; DepObj.Description_ja = model.Description; break; case "pt": DepObj.Name_pt = model.Name; DepObj.Description_pt = model.Description; break; case "zh": DepObj.Name_zh = model.Name; DepObj.Description_zh = model.Description; break; default: break; } DepObj.Type = model.Type; DepObj.GeneralPromotion = model.GeneralPromotion; DepObj.StartDate = model.StartDate; DepObj.TargetStartDate = model.TargetStartDate; DepObj.TargetEndDate = model.TargetEndDate; DepObj.Count = model.Count; DepObj.DiscountPercentage = model.DiscountPercentage; DepObj.RegionID = model.RegionID; DepObj.Sort = Convert.ToInt16(model.Sorts); DepObj.Active = model.Active; DepObj.OpDateTime = DateTime.Now; DepObj.OpUserID = 0; DE.SaveChanges(); } return status; }
public bool Update(TB_AttributeHeaderExt model, ref string Msg, Controller ctrl) { bool status = true; using (DBEntities DE = new DBEntities()) { var DepObj = DE.TB_AttributeHeader.Where(x => x.ID == model.ID).FirstOrDefault(); DepObj.Code = model.Code; DepObj.Name_en = model.Name; DepObj.Sort = Convert.ToInt16(model.Sorts); DepObj.Active = model.Active; DepObj.OpDateTime = DateTime.Now; DepObj.OpUserID = Convert.ToInt64(ctrl.Session["UserID"]); DE.SaveChanges(); } return status; }
public bool Update(TB_TypeHotelClassExt model, ref string Msg, Controller ctrl) { bool status = true; using (DBEntities DE = new DBEntities()) { var DepObj = DE.TB_TypeHotelClass.Where(x => x.ID == model.ID).FirstOrDefault(); DepObj.Code = model.Code; DepObj.Name_en = model.Name_en; DepObj.Name_tr = model.Name_tr; DepObj.Name_de = model.Name_de; DepObj.Name_es = model.Name_es; DepObj.Name_fr = model.Name_fr; DepObj.Name_ru = model.Name_ru; DepObj.Name_it = model.Name_it; DepObj.Name_ar = model.Name_ar; DepObj.Name_ja = model.Name_ja; DepObj.Name_pt = model.Name_pt; DepObj.Name_zh = model.Name_zh; DepObj.Sort = Convert.ToInt16(model.Sorts); DepObj.Active = model.Active; DepObj.OpDateTime = DateTime.Now; DepObj.OpUserID = 0; DE.SaveChanges(); } return status; }
public bool Create(MessageExt model, ref string Msg, Controller ctrl) { bool status = true; DBEntities insertentity = new DBEntities(); BizTbl_Message MsgObj = new BizTbl_Message(); MsgObj.Code = model.Code; MsgObj.Description_tr = model.Description_tr; MsgObj.Description_en = model.Description_en; MsgObj.Description_de = model.Description_de; MsgObj.Description_es = model.Description_es; MsgObj.Description_fr = model.Description_fr; MsgObj.Description_ru = model.Description_ru; MsgObj.Description_it = model.Description_it; MsgObj.Description_ar = model.Description_ar; MsgObj.Description_ja = model.Description_ja; MsgObj.Description_pt = model.Description_pt; MsgObj.Description_zh = model.Description_zh; MsgObj.Description_pt = model.Description_pt; MsgObj.IsCommon = true; MsgObj.OpDateTime = DateTime.Now; MsgObj.OpUserID = Convert.ToInt64(ctrl.Session["UserID"]); insertentity.BizTbl_Message.Add(MsgObj); insertentity.SaveChanges(); int id = MsgObj.ID; return status; }