private void SearchGLAccountBudgetList()
    {
        try
        {
            GLAccountBudgetListUI gLAccountBudgetListUI = new GLAccountBudgetListUI();
            gLAccountBudgetListUI.Search = txtGLAccountBudgetSearch.Text;


            DataTable dtb = gLAccountBudgetListBAL.GetGLAccountBudgetListBySearchParameters(gLAccountBudgetListUI);

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

            log.Error("[Finance_General_Ledger_GL_Integration_GLAccountBudgetDetailsForm : SearchGLAccountBudgetList] An error occured in the processing of Record. Details : [" + exp.ToString() + "]");
        }
    }
예제 #2
0
    public int DeleteGLAccountBudget(GLAccountBudgetListUI gLAccountBudgetListUI)
    {
        int result = 0;

        result = gLAccountBudgetListDAL.DeleteGLAccountBudget(gLAccountBudgetListUI);
        return(result);
    }
예제 #3
0
    public DataTable GetGLAccountBudgetListBySearchParameters(GLAccountBudgetListUI gLAccountBudgetListUI)
    {
        DataTable dtb = new DataTable();

        dtb = gLAccountBudgetListDAL.GetGLAccountBudgetListBySearchParameters(gLAccountBudgetListUI);
        return(dtb);
    }
예제 #4
0
    public DataTable GetGLAccountBudgetListById(GLAccountBudgetListUI gLAccountBudgetListUI)
    {
        DataTable dtb = new DataTable();

        dtb = gLAccountBudgetListDAL.GetGLAccountBudgetListById(gLAccountBudgetListUI);
        return(dtb);
    }
예제 #5
0
    private void BindListBySearchParameters(GLAccountBudgetListUI gLAccountBudgetListUI)
    {
        try
        {
            DataTable dtb = gLAccountBudgetListBAL.GetGLAccountBudgetListBySearchParameters(this.gLAccountBudgetListUI);


            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       = "BindListBySearchParameters()";
            logExcpUIobj.ResourceName     = "Finance_General_Ledger_GL_Integration_GLAccountBudgetList.CS";
            logExcpUIobj.RecordId         = "All";
            logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
            logExcpDALobj.SaveExceptionToDB(logExcpUIobj);

            log.Error("[Finance_General_Ledger_GL_Integration_GLAccountBudgetList : BindListBySearchParameters] An error occured in the processing of Record. Details : [" + exp.ToString() + "]");
        }
    }
    public DataTable GetGLAccountBudgetListBySearchParameters(GLAccountBudgetListUI gLAccountBudgetListUI)
    {
        DataSet   ds   = new DataSet();
        DataTable dtbl = new DataTable();

        //Boolean result = false;
        try
        {
            using (SqlConnection SupportCon = new SqlConnection(connectionString))
            {
                SqlCommand sqlCmd = new SqlCommand("SP_GLAccountBudget_SelectBySearchParameters", SupportCon);
                sqlCmd.CommandType    = CommandType.StoredProcedure;
                sqlCmd.CommandTimeout = commandTimeout;

                sqlCmd.Parameters.Add("@Search", SqlDbType.NVarChar);
                sqlCmd.Parameters["@Search"].Value = gLAccountBudgetListUI.Search;

                using (SqlDataAdapter adapter = new SqlDataAdapter(sqlCmd))
                {
                    adapter.Fill(ds);
                }
            }
            if (ds.Tables.Count > 0)
            {
                dtbl = ds.Tables[0];
            }
        }
        catch (Exception exp)
        {
            logExcpUIobj.MethodName       = "GetGLAccountBudgetListBySearchParameters()";
            logExcpUIobj.ResourceName     = "GLAccountBudgetListDAL.CS";
            logExcpUIobj.RecordId         = "Search = " + gLAccountBudgetListUI.Search;
            logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
            logExcpDALobj.SaveExceptionToDB(logExcpUIobj);

            log.Error("[GLAccountBudgetListDAL : GetGLAccountBudgetListBySearchParameters] An error occured in the processing of Record Search = " + gLAccountBudgetListUI.Search + " . Details : [" + exp.ToString() + "]");
        }
        finally
        {
            ds.Dispose();
        }

        return(dtbl);
    }
    public int DeleteGLAccountBudget(GLAccountBudgetListUI gLAccountBudgetListUI)
    {
        int result = 0;

        try
        {
            using (SqlConnection SupportCon = new SqlConnection(connectionString))
            {
                SupportCon.Open();
                SqlCommand sqlCmd = new SqlCommand("SP_GLAccountBudget_Delete", SupportCon);

                sqlCmd.CommandType    = CommandType.StoredProcedure;
                sqlCmd.CommandTimeout = commandTimeout;

                sqlCmd.Parameters.Add("@tbl_GLAccountBudgetId", SqlDbType.NVarChar);
                sqlCmd.Parameters["@tbl_GLAccountBudgetId"].Value = gLAccountBudgetListUI.Tbl_GLAccountBudgetId;

                result = sqlCmd.ExecuteNonQuery();

                sqlCmd.Dispose();
                SupportCon.Close();
            }
        }
        catch (Exception exp)
        {
            logExcpUIobj.MethodName       = "DeleteGLAccountBudget()";
            logExcpUIobj.ResourceName     = "GLAccountBudgetListDAL.CS";
            logExcpUIobj.RecordId         = gLAccountBudgetListUI.Tbl_GLAccountBudgetId;
            logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
            logExcpDALobj.SaveExceptionToDB(logExcpUIobj);

            log.Error("[GLAccountBudgetListDAL : DeleteGLAccountBudget] An error occured in the processing of Record Id : " + gLAccountBudgetListUI.Tbl_GLAccountBudgetId + ". Details : [" + exp.ToString() + "]");
        }

        return(result);
    }