protected void btnSave_Click(object sender, EventArgs e)
 {
     Procurement_CTableAdapters.VIEW_PO_BATCH_PLANTableAdapter batch = new Procurement_CTableAdapters.VIEW_PO_BATCH_PLANTableAdapter();
     try
     {
         //   batch.InsertQuery(txtBatchNo.Text,Session["USER_NAME"].ToString(), System.DateTime.Now, decimal.Parse(ddlPOList.SelectedValue),txtRemarks.Text);
         //  Master.show_success("Batch No " + txtBatchNo.Text + " Created Successfully.");
     }
     catch (Exception ex)
     {
         Master.show_error(ex.Message);
     }
     finally {
         batch.Dispose();
         GC.Collect();
     }
 }
    protected void btnSave_Click(object sender, EventArgs e)
    {
        Procurement_CTableAdapters.VIEW_PO_BATCH_PLANTableAdapter batch = new Procurement_CTableAdapters.VIEW_PO_BATCH_PLANTableAdapter();
        try
        {
            string uname   = Session["USER_NAME"].ToString().ToUpper();
            string user_id = WebTools.GetExpr("USER_ID", "USERS", " WHERE UPPER(USER_NAME)='" + uname + "'");

            batch.InsertQuery(txtBatchNo.Text, decimal.Parse(user_id), System.DateTime.Now, decimal.Parse(ddlPOList.SelectedValue), txtRemarks.Text, ddlStatus.SelectedValue);
            Master.show_success("Batch No " + txtBatchNo.Text + " Created Successfully.");
        }
        catch (Exception ex)
        {
            Master.show_error(ex.Message);
        }
        finally {
            batch.Dispose();
            GC.Collect();
        }
    }