Exemple #1
0
    private void BindGLAccountCategoryList()
    {
        try
        {
            DataTable dtb = gLAccountCategoryListBAL.GetGLAccountCategoryList();

            if (dtb.Rows.Count > 0 && dtb != null)
            {
                gvGLAccountCategorySearch.DataSource = dtb;
                gvGLAccountCategorySearch.DataBind();
                divGLAccountCategorySearchError.Visible = false;
            }
            else
            {
                divGLAccountCategorySearchError.Visible = true;
                lblGLAccountCategorySearchError.Text    = Resources.GlobalResource.msgNoRecordFound;
                gvGLAccountCategorySearch.Visible       = false;
            }
        }
        catch (Exception exp)
        {
            logExcpUIobj.MethodName       = "BindGLAccountCategoryList()";
            logExcpUIobj.ResourceName     = "Finance_General_Ledger_GL_Integration_GLAccountForm.CS";
            logExcpUIobj.RecordId         = "All";
            logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
            logExcpDALobj.SaveExceptionToDB(logExcpUIobj);

            log.Error("[Finance_General_Ledger_GL_Integration_GLAccountForm : BindGLAccountCategoryList] An error occured in the processing of Record. Details : [" + exp.ToString() + "]");
        }
    }
    private void BindList()
    {
        try
        {
            DataTable dtb = gLAccountCategoryListBAL.GetGLAccountCategoryList();

            if (dtb.Rows.Count > 0 && dtb != null)
            {
                gvData.DataSource = dtb;
                gvData.DataBind();
                divError.Visible = false;
                gvData.Visible   = true;
            }
            else
            {
                divError.Visible = true;
                lblError.Text    = Resources.GlobalResource.msgNoRecordFound;
                gvData.Visible   = false;
            }

            txtSearch.Text = "";
            txtSearch.Focus();
        }
        catch (Exception exp)
        {
            logExcpUIobj.MethodName       = "BindList()";
            logExcpUIobj.ResourceName     = "System_Settings_GLAccountCategoryList.CS";
            logExcpUIobj.RecordId         = "All";
            logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
            logExcpDALobj.SaveExceptionToDB(logExcpUIobj);

            log.Error("[System_Settings_GLAccountCategoryList : BindList] An error occured in the processing of Record. Details : [" + exp.ToString() + "]");
        }
    }