protected void btnsubmitoffers_Click(object sender, EventArgs e) { DAC_EnrollCourse oDAC_EnrollCourse = new DAC_EnrollCourse(); REF_EnrollCourse oREF_EnrollCourse = new REF_EnrollCourse(); oREF_EnrollCourse.CusID = dropCusotmer.Value; oREF_EnrollCourse.CourseID = dropCourse.Value; oREF_EnrollCourse.OfferID = 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_EnrollCourse.offer_prices = dt.Rows[0][6].ToString(); DAV_Cources oDAV_Cources = new DAV_Cources(); REF_Course oREF_Course = new REF_Course(); oREF_Course.ID = Convert.ToInt32(dropCourse.Value); dt = oDAV_Cources.SelectCourseByID(oREF_Course); Double CoursePrice = Double.Parse(dt.Rows[0][4].ToString()); Double Total = CoursePrice - OfferPrice; oREF_EnrollCourse.Course_price = dt.Rows[0][3].ToString(); oREF_EnrollCourse.Total = Total.ToString(); oDAC_EnrollCourse.Insert(oREF_EnrollCourse); LoadData(); }
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(); }
public void LoadData(REF_Offers oREF_Offers) { DataTable dt; DAV_Offers oDAV_Offers = new DAV_Offers(); oREF_Offers.ID = Convert.ToInt32(OffersID); dt = oDAV_Offers.SelectOffersByID(oREF_Offers); drpofferType.Value = dt.Rows[0][1].ToString(); offerID.Text = dt.Rows[0][2].ToString(); offersName.Text = dt.Rows[0][3].ToString(); //Request.Form["start"] = dt.Rows[0][4].ToString(); //Request.Form["end"] = dt.Rows[0][5].ToString(); MimumPrice.Text = dt.Rows[0][6].ToString(); MaxmumPrice.Text = dt.Rows[0][7].ToString(); offerDesc.Text = dt.Rows[0][8].ToString(); btnupdate.Visible = true; btndelete.Visible = true; btnsubmitoffers.Visible = false; }
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(); }