예제 #1
0
        public ActionResult ManagePricingForServices(FormCollection form)
        {
            BusinessLayer.BLControllers.BL_Account bl = new BusinessLayer.BLControllers.BL_Account();

            string ServiceTax = form["txtServiceTax"].ToString();
            //for service tax update
            if (form["txtServiceTax"].ToString().Length > 0)
                BLObj.UpdateServiceTaxPricing(form["txtServiceTax"].ToString());

            //for Proofreading Pricing with Service Tax
            if (form["txtProofReading"].ToString().Length > 0)
            {
                //double addingServiceTaxwithProofReadingpricing = Convert.ToDouble(form["txtProofReading"].ToString()) * (Convert.ToDouble(ServiceTax)) / 100;

                //double ProofReadingPricing = Convert.ToDouble(form["txtProofReading"].ToString()) + addingServiceTaxwithProofReadingpricing;

                BLObj.InsertProofReadingPricing(form["txtProofReading"].ToString());
            }

            //for Formatting Pricing with Service Tax
            if (form["txtFormatting"].ToString().Length > 0)
            {
                //double addingServiceTaxwithFormattingpricing = Convert.ToDouble(form["txtFormatting"].ToString()) * (Convert.ToDouble(ServiceTax)) / 100;

                //double FormattingPricing = Convert.ToDouble(form["txtFormatting"].ToString()) + addingServiceTaxwithFormattingpricing;

                BLObj.InsertFormatingPricing(form["txtFormatting"].ToString());
            }

            //for Illustration Pricing with Service Tax
            if (form["txtIllustrationPrice"].ToString().Length > 0 && form["ddlIllType"].ToString().Length > 0 && form["ddlColor"].ToString().Length > 0)
            {
                //double addingServiceTaxwithIllustrationpricing = Convert.ToDouble(form["txtIllustrationPrice"].ToString()) * (Convert.ToDouble(ServiceTax)) / 100;

                //double IllustrationPricing = Convert.ToDouble(form["txtIllustrationPrice"].ToString()) + addingServiceTaxwithIllustrationpricing;

                int illtype = Convert.ToInt32(form["ddlIllType"].ToString());

                int illcolor = Convert.ToInt32(form["ddlColor"].ToString());

                BLObj.UpdateIllustrationPricing(illtype, illcolor, form["txtIllustrationPrice"].ToString());

            }

            //for CoverDesign Pricing with Service Tax
            if (form["txtCoverDesingForGraphics"].ToString().Length > 0 || form["txtCoverDesingForIllustrative"].ToString().Length > 0)
            {
                //double addingServiceTaxwithCoverDesingpricing = 0.00,CoverDesingPricing = 0.00;

                if (form["txtCoverDesingForGraphics"].ToString().Length > 0)
                {
                    //addingServiceTaxwithCoverDesingpricing = Convert.ToDouble(form["txtCoverDesingForGraphics"].ToString()) * (Convert.ToDouble(ServiceTax)) / 100;
                    //CoverDesingPricing = Convert.ToDouble(form["txtCoverDesingForGraphics"].ToString()) + addingServiceTaxwithCoverDesingpricing;
                    BLObj.UpdateCoverDesingPricing(form["txtCoverDesingForGraphics"].ToString(), "Graphical");
                }
                else
                {
                    //addingServiceTaxwithCoverDesingpricing = Convert.ToDouble(form["txtCoverDesingForIllustrative"].ToString()) * (Convert.ToDouble(ServiceTax)) / 100;
                    //CoverDesingPricing = Convert.ToDouble(form["txtCoverDesingForIllustrative"].ToString()) + addingServiceTaxwithCoverDesingpricing;
                    BLObj.UpdateCoverDesingPricing(form["txtCoverDesingForIllustrative"].ToString(), "Illustative");
                }

            }

            ServicePricing model = new ServicePricing();
            model.ListColor = LoadColorDropDown();
            model.ListIllustrationType = LoadIllTypeDropDown();

            ViewBag.ClassName = "bg-success text-success";
            ViewBag.ResultMessage = "Prices are changed sucessfully";

            return View(model);
        }
예제 #2
0
 public ActionResult ManagePricingForServices()
 {
     ServicePricing model = new ServicePricing();
     model.ListColor = LoadColorDropDown();
     model.ListIllustrationType = LoadIllTypeDropDown();
     return View(model);
 }