Esempio n. 1
0
    private void FillForm(GLAccountSummaryFormUI gLAccountSummaryFormUI)
    {
        try
        {
            DataTable dtb = gLAccountSummaryFormBAL.GetGLAccountSummaryListById(gLAccountSummaryFormUI);

            if (dtb.Rows.Count > 0)
            {
                txtGLAccountGuid.Text    = dtb.Rows[0]["tbl_GLAccountId"].ToString();
                txtGLAccount.Text        = dtb.Rows[0]["AccountNumber"].ToString();
                txtFiscalPeriodGuid.Text = dtb.Rows[0]["tbl_FiscalPeriodId"].ToString();
                txtFiscalPeriod.Text     = dtb.Rows[0]["NumberOfPeriod"].ToString();
            }
            else
            {
                lblError.Text      = Resources.GlobalResource.msgCouldNotLoadData;
                divError.Visible   = true;
                divSuccess.Visible = false;
            }
        }
        catch (Exception exp)
        {
            logExcpUIobj.MethodName       = "FillForm()";
            logExcpUIobj.ResourceName     = "Finance_General_Ledger_GL_Integration_GLAccountSummaryForm.CS";
            logExcpUIobj.RecordId         = gLAccountSummaryFormUI.Tbl_GLAccountSummaryId;
            logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
            logExcpDALobj.SaveExceptionToDB(logExcpUIobj);

            log.Error("[Finance_General_Ledger_GL_Integration_GLAccountSummaryForm : FillForm] An error occured in the processing of Record Details : [" + exp.ToString() + "]");
        }
    }
Esempio n. 2
0
    protected override void Page_Load(object sender, EventArgs e)
    {
        GLAccountSummaryFormUI gLAccountSummaryFormUI = new GLAccountSummaryFormUI();

        if (!Page.IsPostBack)
        {
            if (Request.QueryString["GLAccountSummaryId"] != null)
            {
                gLAccountSummaryFormUI.Tbl_GLAccountSummaryId = Request.QueryString["GLAccountSummaryId"];


                FillForm(gLAccountSummaryFormUI);

                btnSave.Visible   = false;
                btnClear.Visible  = false;
                btnUpdate.Visible = true;
                btnDelete.Visible = true;
                lblHeading.Text   = "Update GLAccountSummary";
            }
            else
            {
                btnSave.Visible   = true;
                btnClear.Visible  = true;
                btnUpdate.Visible = false;
                btnDelete.Visible = false;
                lblHeading.Text   = "Add New GLAccountSummary";
            }
        }
    }
Esempio n. 3
0
    public int DeleteGLAccountSummary(GLAccountSummaryFormUI gLAccountSummaryFormUI)
    {
        int resutl = 0;

        resutl = gLAccountSummaryFormDAL.DeleteGLAccountSummary(gLAccountSummaryFormUI);
        return(resutl);
    }
Esempio n. 4
0
    public DataTable GetGLAccountSummaryListById(GLAccountSummaryFormUI gLAccountSummaryFormUI)
    {
        DataTable dtb = new DataTable();

        dtb = gLAccountSummaryFormDAL.GetGLAccountSummaryListById(gLAccountSummaryFormUI);
        return(dtb);
    }
Esempio n. 5
0
    public int UpdateGLAccountSummary(GLAccountSummaryFormUI gLAccountSummaryFormUI)
    {
        int result = 0;

        try
        {
            using (SqlConnection SupportCon = new SqlConnection(connectionString))
            {
                SupportCon.Open();
                SqlCommand sqlCmd = new SqlCommand("SP_GLAccountSummary_Update", SupportCon);
                sqlCmd.CommandType    = CommandType.StoredProcedure;
                sqlCmd.CommandTimeout = commandTimeout;

                sqlCmd.Parameters.Add("@tbl_GLAccountSummaryId", SqlDbType.NVarChar);
                sqlCmd.Parameters["@tbl_GLAccountSummaryId"].Value = gLAccountSummaryFormUI.Tbl_GLAccountSummaryId;

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

                sqlCmd.Parameters.Add("@tbl_OrganizationId", SqlDbType.NVarChar);
                sqlCmd.Parameters["@tbl_OrganizationId"].Value = gLAccountSummaryFormUI.Tbl_OrganizationId;

                sqlCmd.Parameters.Add("@tbl_GLAccountId", SqlDbType.NVarChar);
                sqlCmd.Parameters["@tbl_GLAccountId"].Value = gLAccountSummaryFormUI.Tbl_GLAccountId;

                sqlCmd.Parameters.Add("@tbl_FiscalPeriodId", SqlDbType.NVarChar);
                sqlCmd.Parameters["@tbl_FiscalPeriodId"].Value = gLAccountSummaryFormUI.Tbl_FiscalPeriodId;

                result = sqlCmd.ExecuteNonQuery();

                sqlCmd.Dispose();
                SupportCon.Close();
            }
        }
        catch (Exception exp)
        {
            logExcpUIobj.MethodName       = "UpdateGLAccountSummary()";
            logExcpUIobj.ResourceName     = "GLAccountSummaryFormDAL.CS";
            logExcpUIobj.RecordId         = gLAccountSummaryFormUI.Tbl_GLAccountSummaryId;
            logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
            logExcpDALobj.SaveExceptionToDB(logExcpUIobj);

            log.Error("[GLAccountSummaryFormDAL : UpdateGLAccountSummary] An error occured in the processing of Record Id : " + gLAccountSummaryFormUI.Tbl_GLAccountSummaryId + ". Details : [" + exp.ToString() + "]");
        }

        return(result);
    }
Esempio n. 6
0
    public DataTable GetGLAccountSummaryListById(GLAccountSummaryFormUI gLAccountSummaryFormUI)
    {
        DataSet   ds   = new DataSet();
        DataTable dtbl = new DataTable();

        try
        {
            using (SqlConnection SupportCon = new SqlConnection(connectionString))
            {
                SqlCommand sqlCmd = new SqlCommand("SP_GLAccountSummary_SelectById", SupportCon);
                sqlCmd.CommandType    = CommandType.StoredProcedure;
                sqlCmd.CommandTimeout = commandTimeout;

                sqlCmd.Parameters.Add("@tbl_GLAccountSummaryId", SqlDbType.NVarChar);
                sqlCmd.Parameters["@tbl_GLAccountSummaryId"].Value = gLAccountSummaryFormUI.Tbl_GLAccountSummaryId;

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

            log.Error("[GLAccountSummaryFormDAL : getGLAccountSummaryListById] An error occured in the processing of Record Id : " + gLAccountSummaryFormUI.Tbl_GLAccountSummaryId + ". Details : [" + exp.ToString() + "]");
        }
        finally
        {
            ds.Dispose();
        }

        return(dtbl);
    }