Beispiel #1
0
        public void UpdateSightSeeingTariffPrice(SightSeeingTariffPriceInfo sightseeingtariffprice)
        {
            _sqlHelper.ExecuteNonQuery(SetValuesInSightSeeingTariffPrice(sightseeingtariffprice), Storeprocedures.spUpdateSightSeeingTariffPrice.ToString(), CommandType.StoredProcedure);

            DeleteSightSeeingTariffCharges(sightseeingtariffprice);

            InsertPriceChargesDetails(sightseeingtariffprice);
        }
Beispiel #2
0
        public void DeleteSightSeeingTariffCharges(SightSeeingTariffPriceInfo sightseeingtariffprice)
        {
            List <SqlParameter> sqlParam = new List <SqlParameter>();

            sqlParam.Add(new SqlParameter("SightSeeingTariffPriceId", sightseeingtariffprice.SightSeeingTariffPriceId));

            _sqlHelper.ExecuteNonQuery(sqlParam, Storeprocedures.spDeleteSightSeeingTariffCharges.ToString(), CommandType.StoredProcedure);
        }
Beispiel #3
0
        public int InsertSightSeeingTariffPrice(SightSeeingTariffPriceInfo sightseeingtariffprice)
        {
            sightseeingtariffprice.SightSeeingTariffPriceId = Convert.ToInt32(_sqlHelper.ExecuteScalerObj(SetValuesInSightSeeingTariffPrice(sightseeingtariffprice), Storeprocedures.spInsertSightSeeingTariffPrice.ToString(), CommandType.StoredProcedure));

            InsertPriceChargesDetails(sightseeingtariffprice);


            return(sightseeingtariffprice.SightSeeingTariffPriceId);
        }
Beispiel #4
0
        private List <SqlParameter> SetValuesInSightSeeingTariffPrice(SightSeeingTariffPriceInfo sightseeingtariffprice)
        {
            List <SqlParameter> sqlParams = new List <SqlParameter>();

            if (sightseeingtariffprice.SightSeeingTariffPriceId != 0)
            {
                sqlParams.Add(new SqlParameter("@SightSeeingTariffPriceId", sightseeingtariffprice.SightSeeingTariffPriceId));
            }
            else
            {
                sqlParams.Add(new SqlParameter("@CreatedDate", sightseeingtariffprice.CreatedDate));

                sqlParams.Add(new SqlParameter("@CreatedBy", sightseeingtariffprice.CreatedBy));
            }
            sqlParams.Add(new SqlParameter("@SightSeeingTariffOccupancyId", sightseeingtariffprice.SightSeeingTariffOccupancyId));
            Logger.Debug("SightSeeing Controller SightSeeingTariffOccupancyId:" + sightseeingtariffprice.SightSeeingTariffOccupancyId);

            sqlParams.Add(new SqlParameter("@PublishPrice", sightseeingtariffprice.PublishPrice));
            Logger.Debug("SightSeeing Controller PublishPrice:" + sightseeingtariffprice.PublishPrice);

            sqlParams.Add(new SqlParameter("@SpecialPrice", sightseeingtariffprice.SpecialPrice));
            Logger.Debug("SightSeeing Controller SpecialPrice:" + sightseeingtariffprice.SpecialPrice);

            sqlParams.Add(new SqlParameter("@CommissionPrice", sightseeingtariffprice.CommissionPrice));
            Logger.Debug("SightSeeing Controller CommissionPrice:" + sightseeingtariffprice.CommissionPrice);

            sqlParams.Add(new SqlParameter("@FormulaId", sightseeingtariffprice.FormulaId));
            Logger.Debug("SightSeeing Controller FormulaId:" + sightseeingtariffprice.FormulaId);

            sqlParams.Add(new SqlParameter("@TotalTaxPrice", sightseeingtariffprice.TotalTaxPrice));
            Logger.Debug("SightSeeing Controller TotalTaxPrice:" + sightseeingtariffprice.TotalTaxPrice);

            sqlParams.Add(new SqlParameter("@NetRate", sightseeingtariffprice.NetRate));
            Logger.Debug("SightSeeing Controller NetRate:" + sightseeingtariffprice.NetRate);

            sqlParams.Add(new SqlParameter("@Color", sightseeingtariffprice.Color));
            Logger.Debug("SightSeeing Controller Color:" + sightseeingtariffprice.Color);

            sqlParams.Add(new SqlParameter("@UpdatedDate", sightseeingtariffprice.UpdatedDate));

            sqlParams.Add(new SqlParameter("@UpdatedBy", sightseeingtariffprice.UpdatedBy));

            return(sqlParams);
        }
Beispiel #5
0
        public SightSeeingTariffPriceInfo GetSightSeeingTariffPriceById(int sightseeingTariffPriceId)
        {
            SightSeeingTariffPriceInfo sightseeingTariffPrice = new SightSeeingTariffPriceInfo();

            List <SqlParameter> sqlParams = new List <SqlParameter>();

            sqlParams.Add(new SqlParameter("@SightSeeingTariffPriceId", sightseeingTariffPriceId));

            DataTable dt = _sqlHelper.ExecuteDataTable(sqlParams, Storeprocedures.spGetSightSeeingTariffPriceById.ToString(), CommandType.StoredProcedure);

            if (dt != null && dt.Rows.Count > 0)
            {
                foreach (DataRow dr in dt.Rows)
                {
                    sightseeingTariffPrice = GetPriceValues(dr);
                }
            }

            return(sightseeingTariffPrice);
        }
Beispiel #6
0
        public void InsertPriceChargesDetails(SightSeeingTariffPriceInfo sightseeingtariffprice)
        {
            foreach (var item in sightseeingtariffprice.SightSeeingTariffCharges)
            {
                List <SqlParameter> sqlParam = new List <SqlParameter>();

                if (item.SightSeeingTariffChargesId != 0)
                {
                    sqlParam.Add(new SqlParameter("@SightSeeingTariffChargesId", item.SightSeeingTariffChargesId));
                }

                sqlParam.Add(new SqlParameter("@SightSeeingTariffPriceId", sightseeingtariffprice.SightSeeingTariffPriceId));

                sqlParam.Add(new SqlParameter("@ChargesId", item.ChargesId));

                sqlParam.Add(new SqlParameter("@Percentage", item.Percentage));

                sqlParam.Add(new SqlParameter("@CalculatedPrice", item.CalculatedPrice));

                _sqlHelper.ExecuteNonQuery(sqlParam, Storeprocedures.spInsertSightSeeingTariffCharges.ToString(), CommandType.StoredProcedure);
            }
        }
Beispiel #7
0
        private SightSeeingTariffPriceInfo GetPriceValues(DataRow dr)
        {
            SightSeeingTariffPriceInfo SightSeeingTariffPrice = new SightSeeingTariffPriceInfo();

            SightSeeingTariffPrice.SightSeeingTariffPriceId = Convert.ToInt32(dr["SightSeeingTariffPriceId"]);

            SightSeeingTariffPrice.SightSeeingTariffOccupancyId = Convert.ToInt32(dr["SightSeeingTariffOccupancyId"]);

            SightSeeingTariffPrice.SpecialPrice = Convert.ToDecimal(dr["SpecialPrice"]);

            SightSeeingTariffPrice.PublishPrice = Convert.ToDecimal(dr["PublishPrice"]);

            SightSeeingTariffPrice.CommissionPrice = Convert.ToDecimal(dr["CommissionPrice"]);

            SightSeeingTariffPrice.FormulaId = Convert.ToInt32(dr["FormulaId"]);

            SightSeeingTariffPrice.TotalTaxPrice = Convert.ToDecimal(dr["TotalTaxPrice"]);

            SightSeeingTariffPrice.NetRate = Convert.ToDecimal(dr["NetRate"]);

            SightSeeingTariffPrice.Color = Convert.ToString(dr["Color"]);

            return(SightSeeingTariffPrice);
        }
        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();
        }