protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    sLoanid = Request.QueryString["loanid"];
                    if (Utility.CheckAccess("LoanMasterAddEdit") == false)
                    {
                        UrlParameterPasser urlWrapper = new UrlParameterPasser();
                        urlWrapper["pageaccesserr"] = "1";
                        urlWrapper.Url = "../DocumentLogSystem/DashBoard.aspx";
                        urlWrapper.PassParameters();
                    }
                    if (!Convert.ToBoolean(Session[clsConstant.SESS_VIEWTYPE]))
                    {
                        this.MakeReadOnly(this.Controls);
                    }
                    else
                    {
                        ddlProjectBind();
                        fillDocCat();
                        fillAgency();
                        btnSubmit.Visible = true;
                        btnUpdate.Visible = false;
                        checkForPMU();
                        fillTA();
                        if (sLoanid != "")
                        {
                            chkLoanClosed.Visible = true;
                        }
                        else
                        {
                            chkLoanClosed.Visible = false;
                        }
                    }
                }

                if (sLoanid != null)
                {
                    if (!IsPostBack)
                    {
                        objLoan = new clsLoanDetails();
                        EntLoanMaster objEnt = objLoan.setEntity(int.Parse(sLoanid));
                        fillData(objEnt);
                    }
                }
            }

            catch (Exception ex)
            {
                logger.Error(ex);
            }
        }
 protected void txtLoanNumber_TextChanged(object sender, EventArgs e)
 {
     try
     {
         objLoan = new clsLoanDetails();
         EntLoanMaster objEnt = objLoan.setEntity(0, txtLoanNumber.Text);
         fillData(objEnt);
     }
     catch (Exception ex)
     {
         logger.Error(ex);
     }
 }