public void Update(ProductSale item) { using (IDataContext ctx = DataContext.Instance()) { var rep = ctx.GetRepository<ProductSale>(); rep.Update(item); } }
/// ----------------------------------------------------------------------------- /// <summary> /// Page_Load runs when the control is loaded /// </summary> /// <remarks> /// </remarks> /// <history> /// </history> /// ----------------------------------------------------------------------------- protected void Page_Load(System.Object sender, System.EventArgs e) { try { //'Order values //InvoiceID = Request.Form("InvoiceID") //BillToFirstName = Request.Form("BillToFirstName") //BillToLastName = Request.Form("BillToLastName") //BillToEmail = Request.Form("BillToEmail") //BillToState = Request.Form("BillToState") //BillToCountry = Request.Form("BillToCountry") //BillToZip = Request.Form("BillToZip") //PackageID = Request.Form("PackageID") //PackageName = Request.Form("PackageName") //OrderDetailID = Request.Form("OrderDetailID") //SKU_UPC = Request.Form("SKU_UPC") //Discount = Request.Form("Discount") //Amount = Request.Form("Amount") //OptionID = Request.Form("OptionID") //OptionName = Request.Form("OptionName") //OptionText = Request.Form("OptionText") //Quantity = Request.Form("Quantity") //Price = Request.Form("Price") //SecurityValue = Request.Form("SecurityValue") //Status = "New" if (Request.Form["InvoiceID"] != null) { ProductSaleController psCtrl = new ProductSaleController(); ProductSale ps = new ProductSale(); ps.InvoiceID = Request.Form["InvoiceID"].ToString(); ps.BillToFirstName = Request.Form["BillToFirstName"].ToString(); ps.BillToLastName = Request.Form["BillToLastName"].ToString(); ps.BillToEmail = Request.Form["BillToEmail"].ToString(); ps.BillToState = Request.Form["BillToState"].ToString(); ps.BillToZip = Request.Form["BillToZip"].ToString(); ps.BillToCountry = Request.Form["BillToCountry"].ToString(); ps.PackageID = Request.Form["PackageID"].ToString(); ps.OrderDetailID = Request.Form["OrderDetailID"].ToString(); ps.PackageName = Request.Form["PackageName"].ToString(); ps.Quantity = Convert.ToInt32(Request.Form["Quantity"].ToString()); ps.Price = Convert.ToDouble(Request.Form["Price"].ToString()); ps.SKU_UPC = Request.Form["SKU_UPC"].ToString(); ps.Discount = Request.Form["Discount"].ToString(); ps.Amount = Convert.ToDouble(Request.Form["Amount"].ToString()); ps.OptionID = Request.Form["OptionID"].ToString(); ps.OptionName = Request.Form["OptionName"].ToString(); ps.OptionText = Request.Form["OptionText"].ToString(); ps.SecurityValue = Request.Form["SecurityValue"].ToString(); ps.Status = "New"; if (ps.SecurityValue == "DNNQAPPS_SALES##") { psCtrl.Create(ps); } } else { } } catch (Exception exc) //Module failed to load { Exceptions.ProcessModuleLoadException(this, exc); Response.Write(exc.InnerException); } }