private SupplierHotelDayItemInfo Get_SupplierHotelTariffDayItems_Values(DataRow dr) { SupplierHotelDayItemInfo supplierhoteldayitem = new SupplierHotelDayItemInfo(); supplierhoteldayitem.SupplierHotelDayItemId = Convert.ToInt32(dr["SupplierHotelDayItemId"]); supplierhoteldayitem.SupplierHotelDayId = Convert.ToInt32(dr["SupplierHotelDayId"]); supplierhoteldayitem.RefType = Convert.ToInt32(dr["RefType"]); supplierhoteldayitem.HotelId = Convert.ToInt32(dr["HotelId"]); supplierhoteldayitem.RoomTypeId = Convert.ToInt32(dr["RoomTypeId"]); supplierhoteldayitem.SightSeeingId = Convert.ToInt32(dr["SightSeeingId"]); supplierhoteldayitem.VehicleId = Convert.ToInt32(dr["VehicleId"]); supplierhoteldayitem.MealId = Convert.ToInt32(dr["MealId"]); supplierhoteldayitem.HotelName = Convert.ToString(dr["HotelName"]); supplierhoteldayitem.SightSeeingName = Convert.ToString(dr["SightSeeingName"]); supplierhoteldayitem.VehicleName = Convert.ToString(dr["VehicleName"]); supplierhoteldayitem.MealName = Convert.ToString(dr["MealName"]); supplierhoteldayitem.RoomTypeName = Convert.ToString(dr["RoomTypeName"]); supplierhoteldayitem.IsActive = Convert.ToBoolean(dr["IsActive"]); supplierhoteldayitem.CreatedDate = Convert.ToDateTime(dr["CreatedDate"]); supplierhoteldayitem.CreatedBy = Convert.ToInt32(dr["CreatedBy"]); supplierhoteldayitem.UpdatedDate = Convert.ToDateTime(dr["UpdatedDate"]); supplierhoteldayitem.UpdatedBy = Convert.ToInt32(dr["UpdatedBy"]); return(supplierhoteldayitem); }
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>(); }
private List <SqlParameter> Set_Values_In_SupplierHotelDayItem(SupplierHotelDayItemInfo supplierhoteldayitem) { List <SqlParameter> sqlParams = new List <SqlParameter>(); if (supplierhoteldayitem.SupplierHotelDayItemId != 0) { sqlParams.Add(new SqlParameter("@SupplierHotelDayItemId", supplierhoteldayitem.SupplierHotelDayItemId)); } sqlParams.Add(new SqlParameter("@SupplierHotelDayId", supplierhoteldayitem.SupplierHotelDayId)); if (supplierhoteldayitem.HotelId != 0) { sqlParams.Add(new SqlParameter("@RefType", (int)SupplierTariffItem.Hotel)); } else if (supplierhoteldayitem.SightSeeingId != 0) { sqlParams.Add(new SqlParameter("@RefType", (int)SupplierTariffItem.SightSeeing)); } else if (supplierhoteldayitem.VehicleId != 0) { sqlParams.Add(new SqlParameter("@RefType", (int)SupplierTariffItem.Vehicle)); } else if (supplierhoteldayitem.MealId != 0) { sqlParams.Add(new SqlParameter("@RefType", (int)SupplierTariffItem.Meal)); } else { } sqlParams.Add(new SqlParameter("@HotelId", supplierhoteldayitem.HotelId)); sqlParams.Add(new SqlParameter("@RoomTypeId", supplierhoteldayitem.RoomTypeId)); sqlParams.Add(new SqlParameter("@SightSeeingId", supplierhoteldayitem.SightSeeingId)); sqlParams.Add(new SqlParameter("@VehicleId", supplierhoteldayitem.VehicleId)); sqlParams.Add(new SqlParameter("@MealId", supplierhoteldayitem.MealId)); sqlParams.Add(new SqlParameter("@IsActive", supplierhoteldayitem.IsActive)); sqlParams.Add(new SqlParameter("@CreatedDate", supplierhoteldayitem.CreatedDate)); sqlParams.Add(new SqlParameter("@CreatedBy", supplierhoteldayitem.CreatedBy)); sqlParams.Add(new SqlParameter("@UpdatedDate", supplierhoteldayitem.UpdatedDate)); sqlParams.Add(new SqlParameter("@UpdatedBy", supplierhoteldayitem.UpdatedBy)); return(sqlParams); }
public void Insert_SupplierHotelDayItem(SupplierHotelDayItemInfo supplierhoteldayitem) { _sqlHelper.ExecuteNonQuery(Set_Values_In_SupplierHotelDayItem(supplierhoteldayitem), Storeprocedures.sp_Insert_SupplierHotelDayItem.ToString(), CommandType.StoredProcedure); }