protected void btnSubmit_Click(object sender, EventArgs e) { Order order = new Order(); purchaseData = new PurchaseData(); orderCart = new OrderCart(); order.VendorId = Convert.ToInt32(dpVendor.SelectedItem.Value); order.CreatedBy = GlobalInfo.Userid; order.TillDate = (Convert.ToDateTime(txtTillDate.Text)).ToString("dd-MM-yyyy"); order.Tokan = hftokanno.Value; order.Frieght = txtFrieght.Text; order.PaymentTerms = txtTerms.Text; order.TransDamage = txtTrDamage.Text; order.Warranty = txtWarranties.Text; order.TotalAmt = Convert.ToDecimal(hftotalAmout.Value); if (order.TotalAmt > 49999) { order.MDApproval = "Pending"; } else { order.MDApproval = "Not Required"; } orderCart.Tokan = hftokanno.Value; bool result = purchaseData.SubmitOrder(order); if (result) { bindCartList(orderCart); clearFields(); divDanger.Visible = false; divwarning.Visible = false; divSusccess.Visible = true; pnlError.Update(); upMain.Update(); } else { divDanger.Visible = false; divwarning.Visible = true; divSusccess.Visible = false; lblwarning.Text = "Please Contact to Site Admin"; pnlError.Update(); } dpSelect(); }