Пример #1
0
        protected void GetChartOfAccountListByAccountType(string accountType)
        {
            ChartOfAccountBLL chartOfAccount = new ChartOfAccountBLL();

            try
            {
                DataTable dt = chartOfAccount.GetChartOfAccountListByAccountType(accountType);

                chartOfAccountListGridView.DataSource = dt;
                chartOfAccountListGridView.DataBind();

                if (chartOfAccountListGridView.Rows.Count > 0)
                {
                    chartOfAccountListGridView.UseAccessibleHeader = true;
                    chartOfAccountListGridView.HeaderRow.TableSection = TableRowSection.TableHeader;
                }
                else
                {
                    msgbox.Visible = true; msgTitleLabel.Text = "Chart Of Account List Data Not Found!!!"; msgDetailLabel.Text = "";
                    msgbox.Attributes.Add("class", "alert alert-warning");
                }
            }
            catch (Exception ex)
            {
                string message = ex.Message;
                if (ex.InnerException != null) { message += " --> " + ex.InnerException.Message; }
                MyAlertBox("ErrorAlert(\"" + ex.GetType() + "\", \"" + message + "\", \"\");");
            }
            finally
            {
                chartOfAccount = null;
            }
        }
        protected void PopulateChartOfAccountTreeViewByAccountType(string accountType)
        {
            ChartOfAccountBLL chartOfAccount = new ChartOfAccountBLL();

            try
            {
                DataTable dt = chartOfAccount.GetChartOfAccountListByAccountType(accountType);

                if (dt.Rows.Count > 0)
                {
                    chartOfAccountTreeView.Nodes.Clear();
                    AddTopTreeViewNodes(dt);
                }
                else
                {
                    msgbox.Visible = true; msgTitleLabel.Text = "Chart Of Account List Data Not Found!!!"; msgDetailLabel.Text = "";
                    msgbox.Attributes.Add("class", "alert alert-warning");
                }
            }
            catch (Exception ex)
            {
                string message = ex.Message;
                if (ex.InnerException != null) { message += " --> " + ex.InnerException.Message; }
                MyAlertBox("ErrorAlert(\"" + ex.GetType() + "\", \"" + message + "\", \"\");");
            }
            finally
            {
                chartOfAccount = null;
            }
        }