public List <SqlParameter> SetValuesInSupplierHotelTariffInfo(SupplierHotelTariffInfo supplierHotelTariff) { List <SqlParameter> sqlParam = new List <SqlParameter>(); if (supplierHotelTariff.SupplierHotelId != 0) { sqlParam.Add(new SqlParameter("@SupplierHotelId", supplierHotelTariff.SupplierHotelId)); } else { sqlParam.Add(new SqlParameter("@CreatedDate", supplierHotelTariff.CreatedDate)); sqlParam.Add(new SqlParameter("@CreatedBy", supplierHotelTariff.CreatedBy)); } sqlParam.Add(new SqlParameter("@SupplierId", supplierHotelTariff.SupplierId)); sqlParam.Add(new SqlParameter("@PackageName", supplierHotelTariff.PackageName)); sqlParam.Add(new SqlParameter("@IsActive", supplierHotelTariff.IsActive)); sqlParam.Add(new SqlParameter("@UpdatedDate", supplierHotelTariff.UpdatedDate)); sqlParam.Add(new SqlParameter("@UpdatedBy", supplierHotelTariff.UpdatedBy)); sqlParam.Add(new SqlParameter("@DayDuration", supplierHotelTariff.DayDuration)); sqlParam.Add(new SqlParameter("@NightDuration", supplierHotelTariff.NightDuration)); return(sqlParam); }
public SupplierHotelTariffViewModel() { SupplierHotelTariff = new SupplierHotelTariffInfo(); SupplierHotelDetail = new SupplierHotelDetailInfo(); SupplierOccupancyDetail = new SupplierOccupancyDetailInfo(); SupplierHotelCustomerCategory = new SupplierHotelCustomerCategoryInfo(); SupplierHotelCustomerCategories = new List <SupplierHotelCustomerCategoryInfo>(); LstVendor = new List <VendorInfo>(); LstCities = new List <CityInfo>(); LstRoomTypes = new List <RoomTypeInfo>(); LstMeals = new List <MealInfo>(); LstHotel = new List <HotelInfo>(); FriendlyMessage = new List <FriendlyMessage>(); SupplierHotelTariffDuration = new SupplierHotelTariffDurationInfo(); SupplierHotelTariffDurations = new List <SupplierHotelTariffDurationInfo>(); LstStandardCharges = new List <ChargesInfo>(); LstSupplierHotelPriceDetail = new List <SupplierHotelPriceDetailInfo>(); LstSupplierHotelPrice = new List <SupplierHotelPriceInfo>(); CustomerCategories = new List <CustomerCategoryInfo>(); LstStandardCharges = new List <ChargesInfo>(); LstTaxFormula = new List <TaxFormulaInfo>(); LstTaxFormulaCharges = new List <TaxFormulaChargesInfo>(); SupplierHotelPrice = new SupplierHotelPriceInfo(); Pager = new PaginationInfo(); Cities = new List <CityInfo>(); SupplierHotelTariffDayInfo = new SupplierHotelTariffDayInfo(); SupplierHotelTariffDays = new List <SupplierHotelTariffDayInfo>(); SupplierHotelDayItem = new SupplierHotelDayItemInfo(); SupplierHotelDayItems = new List <SupplierHotelDayItemInfo>(); }
public void InsertSupplierHotel(SupplierHotelTariffInfo supplierHotelTariffInfo) { //_sqlHelper.ExecuteNonQuery(SetValuesInSupplierHotelTariffInfo(supplierHotelTariffInfo), Storeprocedures.spInsertSupplierHotel.ToString(), CommandType.StoredProcedure); int id = Convert.ToInt32(_sqlHelper.ExecuteScalerObj(SetValuesInSupplierHotelTariffInfo(supplierHotelTariffInfo), Storeprocedures.spInsertSupplierHotel.ToString(), CommandType.StoredProcedure)); foreach (var item in supplierHotelTariffInfo.supplierHotelTariffDays) { item.SupplierHotelId = id; _sqlHelper.ExecuteNonQuery(Set_Values_In_SupplierHotelDays(item), Storeprocedures.sp_Insert_SupplierHotelDays.ToString(), CommandType.StoredProcedure); } }
public SupplierSearchViewModel() { FriendlyMessage = new List <FriendlyMessage>(); SupplierSearch = new SupplierSearchInfo(); SupplierSearchList = new List <SupplierSearchInfo>(); SupplierList = new List <SupplierSearchInfo>(); SupplierHotelList = new List <SupplierSearchInfo>(); SupplierSearchRoomList = new List <SupplierSearchInfo>(); SupplierSearchExtraList = new List <SupplierSearchInfo>(); SupplierSearchExtraChildList = new List <SupplierSearchInfo>(); SupplierSearchFilter = new SupplierSearchFilter(); SupplierSearchFilterList = new List <SupplierSearchFilter>(); SupplierHotelTariff = new SupplierHotelTariffInfo(); SupplierHotelTariffs = new List <SupplierHotelTariffInfo>(); Cities = new List <CityInfo>(); Countries = new List <CountryInfo>(); States = new List <StateInfo>(); Pager = new PaginationInfo(); }
public void UpdateSupplierHotel(SupplierHotelTariffInfo supplierHotelTariffInfo) { _sqlHelper.ExecuteNonQuery(SetValuesInSupplierHotelTariffInfo(supplierHotelTariffInfo), Storeprocedures.spUpdateSupplierHotel.ToString(), CommandType.StoredProcedure); }