private SightSeeingTariffOccupancyInfo GetSightSeeingTariffOccupancyValues(DataRow dr) { SightSeeingTariffOccupancyInfo sightseeingtariffoccupancy = new SightSeeingTariffOccupancyInfo(); sightseeingtariffoccupancy.SightSeeingTariffId = Convert.ToInt32(dr["SightSeeingTariffId"]); sightseeingtariffoccupancy.OccupancyId = Convert.ToInt32(dr["OccupancyId"]); sightseeingtariffoccupancy.AgeFrom = Convert.ToDecimal(dr["AgeFrom"]); sightseeingtariffoccupancy.AgeTo = Convert.ToDecimal(dr["AgeFrom"]); sightseeingtariffoccupancy.MealId = Convert.ToInt32(dr["MealId"]); sightseeingtariffoccupancy.Inclusion = Convert.ToString(dr["Inclusion"]); sightseeingtariffoccupancy.Exclusion = Convert.ToString(dr["Exclusion"]); sightseeingtariffoccupancy.CreatedDate = Convert.ToDateTime(dr["CreatedDate"]); sightseeingtariffoccupancy.CreatedBy = Convert.ToInt32(dr["CreatedBy"]); sightseeingtariffoccupancy.UpdatedDate = Convert.ToDateTime(dr["UpdatedDate"]); sightseeingtariffoccupancy.UpdatedBy = Convert.ToInt32(dr["UpdatedBy"]); return(sightseeingtariffoccupancy); }
private List <SqlParameter> SetValuesInSightSeeingTariffOccupancy(SightSeeingTariffOccupancyInfo sightseeingtariffoccupancy) { List <SqlParameter> sqlParams = new List <SqlParameter>(); if (sightseeingtariffoccupancy.SightSeeingTariffOccupancyId != 0) { sqlParams.Add(new SqlParameter("@SightSeeingTariffOccuapancyId", sightseeingtariffoccupancy.SightSeeingTariffOccupancyId)); } else { sqlParams.Add(new SqlParameter("@CreatedDate", sightseeingtariffoccupancy.CreatedDate)); sqlParams.Add(new SqlParameter("@CreatedBy", sightseeingtariffoccupancy.CreatedBy)); sqlParams.Add(new SqlParameter("@SightSeeingTariffId", sightseeingtariffoccupancy.SightSeeingTariffId)); Logger.Debug("SightSeeingTariff Controller SightSeeingTariffId:" + sightseeingtariffoccupancy.SightSeeingTariffId); } sqlParams.Add(new SqlParameter("@OccupancyId", sightseeingtariffoccupancy.OccupancyId)); Logger.Debug("SightSeeingTariff Controller OccupancyId:" + sightseeingtariffoccupancy.OccupancyId); sqlParams.Add(new SqlParameter("@AgeFrom", sightseeingtariffoccupancy.AgeFrom)); Logger.Debug("SightSeeingTariff Controller AgeFrom:" + sightseeingtariffoccupancy.AgeFrom); sqlParams.Add(new SqlParameter("@AgeTo", sightseeingtariffoccupancy.AgeTo)); Logger.Debug("SightSeeingTariff Controller AgeTo:" + sightseeingtariffoccupancy.AgeTo); sqlParams.Add(new SqlParameter("@MealId", sightseeingtariffoccupancy.MealId)); Logger.Debug("SightSeeingTariff Controller MealId:" + sightseeingtariffoccupancy.MealId); sqlParams.Add(new SqlParameter("@Inclusion", sightseeingtariffoccupancy.Inclusion)); Logger.Debug("SightSeeingTariff Controller Inclusion:" + sightseeingtariffoccupancy.Inclusion); sqlParams.Add(new SqlParameter("@Exclusion", sightseeingtariffoccupancy.Exclusion)); Logger.Debug("SightSeeingTariff Controller Exclusion:" + sightseeingtariffoccupancy.Exclusion); sqlParams.Add(new SqlParameter("@UpdatedDate", sightseeingtariffoccupancy.UpdatedDate)); sqlParams.Add(new SqlParameter("@UpdatedBy", sightseeingtariffoccupancy.UpdatedBy)); return(sqlParams); }
public int InsertSightSeeingtTariffOccupancy(SightSeeingTariffOccupancyInfo sightseeingtariffoccupancy) { return(Convert.ToInt32(_sqlHelper.ExecuteScalerObj(SetValuesInSightSeeingTariffOccupancy(sightseeingtariffoccupancy), Storeprocedures.spInsertSightSeeingTariffOccupancy.ToString(), CommandType.StoredProcedure))); }
public void UpdateSightSeeingtTariffOccupancy(SightSeeingTariffOccupancyInfo sightseeingtariffoccupancy) { _sqlHelper.ExecuteNonQuery(SetValuesInSightSeeingTariffOccupancy(sightseeingtariffoccupancy), Storeprocedures.spUpdateSightSeeingtTariffOccupancy.ToString(), CommandType.StoredProcedure); }
public SightSeeingTariffViewModel() { //For Sight Seeing Tariff SightSeeingTariff = new SightSeeingTariffInfo(); SightSeeingTariffs = new List <SightSeeingTariffInfo>(); Filter = new SightSeeingTariffFilter(); Vendors = new List <VendorInfo>(); SightSeeings = new List <SightSeeingInfo>(); Meals = new List <MealInfo>(); Occupancies = new List <OccupancyInfo>(); Pager = new PaginationInfo(); FriendlyMessage = new List <FriendlyMessage>(); //for date details SightSeeingTariffDate = new SightSeeingTariffDateInfo(); SightSeeingTariffDates = new List <SightSeeingTariffDateInfo>(); //For Duration Durations = new List <DurationInfo>(); Duration = new DurationInfo(); DurationFilter = new DurationFilter(); //for sight seeing duration SightSeeingTariffDuration = new SightSeeingTariffDurationInfo(); SightSeeingTariffDurations = new List <SightSeeingTariffDurationInfo>(); SightSeeingTariffDurationFilter = new SightSeeingTariffDurationFilter(); //For Sight Seeing Tariff Occupancy SightSeeingTariffOccupancy = new SightSeeingTariffOccupancyInfo(); SightSeeingTariffOccupancies = new List <SightSeeingTariffOccupancyInfo>(); SightSeeingTariffOccupancyFilter = new SightSeeingTariffOccupancyFilter(); //For tax formula LstStandardCharges = new List <ChargesInfo>(); LstTaxFormula = new List <TaxFormulaInfo>(); LstTaxFormulaCharges = new List <TaxFormulaChargesInfo>(); //For Sight Seeing Details SightSeeingDetails = new List <SightSeeingDetailInfo>(); SightSeeingDetail = new SightSeeingDetailInfo(); SightSeeingDetailFilter = new SightSeeingDetailFilter(); //For Sight Seeing Tariff Price SightSeeingTariffPrice = new SightSeeingTariffPriceInfo(); SightSeeingTariffPrices = new List <SightSeeingTariffPriceInfo>(); SightSeeingTariffPriceFilter = new SightSeeingTariffPriceFilter(); //For Sight Seeing Tariff Duration SightSeeingTariffDuration = new SightSeeingTariffDurationInfo(); SightSeeingTariffDurations = new List <SightSeeingTariffDurationInfo>(); SightSeeingTariffDurationFilter = new SightSeeingTariffDurationFilter(); //for Customer Category SightSeeingTariffCustomerCategory = new SightSeeingTariffCustomerCategoryInfo(); SightSeeingTariffCustomerCategories = new List <SightSeeingTariffCustomerCategoryInfo>(); CustomerCategory = new CustomerCategoryInfo(); CustomerCategories = new List <CustomerCategoryInfo>(); SightSeeingTariffCustomerCategoryFilter = new SightSeeingTariffCustomerCategoryFilter(); }