private void getCreditTerm()
        {
            DataTable dt = Credit_Term.RetrieveData(oCon);

            gvCreditLimit.DataSource = dt;
            gvCreditLimit.DataBind();
        }
        protected void btnSaveCL_Click(object sender, EventArgs e)
        {
            Credit_Term_Model mdlCL = new Credit_Term_Model();

            mdlCL.credit_term = txtCreditTerm.Text.Trim();
            mdlCL.term_desc   = txtDescription.Text.Trim();
            mdlCL.days_to_pay = txtDays.Text.Trim();

            if (Session["clMode"].ToString() == "Save")
            {
                Credit_Term.Save(oCon, mdlCL);
            }
            else if (Session["clMode"].ToString() == "Update")
            {
                mdlCL.credit_term = Session["credit_term"].ToString();
                Credit_Term.Update(oCon, mdlCL);
            }
            clearCL();
            getCreditTerm();
        }
 protected void btnDeleteCL_Click(object sender, EventArgs e)
 {
     Credit_Term.Delete(oCon, Session["credit_term"].ToString());
     clearCL();
     getCreditTerm();
 }