예제 #1
0
        protected void btnSubmitIndent_Click(object sender, EventArgs e)
        {
            Indent indent = new Indent();

            purchaseData = new PurchaseData();
            IndentCart ic = new IndentCart();

            indent.IndentByEmp = GlobalInfo.Userid;
            indent.IndentDate  = DateTime.Now;
            // string temp = (Convert.ToDateTime(txtTillDate.Text)).ToString("dd-MM-yyyy");
            indent.TillDate = (Convert.ToDateTime(txtTillDate.Text)).ToString("dd-MM-yyyy");
            indent.Tokan    = hftokanno.Value;
            ic.Tokan        = hftokanno.Value;

            bool result = purchaseData.SubmitIndent(indent);

            if (result)
            {
                ic.Purpose = string.Empty;
                bindCartList(ic);
                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();
        }