Beispiel #1
0
        protected void btnsubmitoffers_Click(object sender, EventArgs e)
        {
            DAC_BookServices oDAC_BookServices = new DAC_BookServices();
            REF_BookServices oREF_BookServices = new REF_BookServices();

            oREF_BookServices.CusID     = Convert.ToInt32(dropCusotmer.Value);
            oREF_BookServices.ServiceID = Convert.ToInt32(dropService.Value);
            oREF_BookServices.OfferID   = Convert.ToInt32(dropoffers.Value);
            DataTable  dt;
            DAV_Offers oDAV_Offers = new DAV_Offers();
            REF_Offers oREF_Offers = new REF_Offers();

            oREF_Offers.ID = Convert.ToInt32(dropoffers.Value);
            dt             = oDAV_Offers.SelectOffersByID(oREF_Offers);
            Double OfferPrice = Double.Parse(dt.Rows[0][6].ToString());

            oREF_BookServices.OfferPrice = dt.Rows[0][6].ToString();

            DAC_Service oDAC_Service = new DAC_Service();
            REF_Service oREF_Service = new REF_Service();

            oREF_Service.ID = Convert.ToInt32(dropService.Value);
            dt = oDAC_Service.SelectServiceByID(oREF_Service);
            Double ServicePrice = Double.Parse(dt.Rows[0][4].ToString());

            Double Total = ServicePrice - OfferPrice;

            oREF_BookServices.ServicePrice = dt.Rows[0][3].ToString();

            oREF_BookServices.TotalPrice = Total.ToString();
            oDAC_BookServices.Insert(oREF_BookServices);
            LoadData();
        }
Beispiel #2
0
        public void LoadData(REF_Service oREF_Service)
        {
            try
            {
                DataTable   dt;
                DAC_Service oDAC_Service = new DAC_Service();

                dt = oDAC_Service.SelectServiceByID(oREF_Service);
                serviceCode.Text     = dt.Rows[0][1].ToString();
                ServiceName.Text     = dt.Rows[0][2].ToString();
                ServiceDuration.Text = dt.Rows[0][3].ToString();
                PricePerHour.Text    = dt.Rows[0][4].ToString();
                Description.Text     = dt.Rows[0][5].ToString();
            }
            catch (Exception ex)
            {
                throw;
            }
        }
Beispiel #3
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            DataTable  dt;
            DAV_Offers oDAV_Offers = new DAV_Offers();
            REF_Offers oREF_Offers = new REF_Offers();

            oREF_Offers.ID = Convert.ToInt32(dropoffers.Value);
            dt             = oDAV_Offers.SelectOffersByID(oREF_Offers);
            Double OfferPrice = Double.Parse(dt.Rows[0][6].ToString());


            DAC_Service oDAC_Service = new DAC_Service();
            REF_Service oREF_Service = new REF_Service();

            oREF_Service.ID = Convert.ToInt32(dropService.Value);
            dt = oDAC_Service.SelectServiceByID(oREF_Service);
            Double ServicePrice = Double.Parse(dt.Rows[0][4].ToString());
            Double Total        = ServicePrice - OfferPrice;

            lbltotal.InnerText = "Total Cost Rs." + Total.ToString();
        }