コード例 #1
0
ファイル: Update.aspx.cs プロジェクト: atiburrahman09/Signbd
        protected void GetChartOfAccountById(string accountId)
        {
            ChartOfAccountBLL chartOfAccount = new ChartOfAccountBLL();

            try
            {
                DataTable dt = chartOfAccount.GetChartOfAccountById(accountId);

                if (dt.Rows.Count > 0)
                {
                    chartOfAccountNameForUpdateHiddenField.Value = accountNameTextBox.Text = dt.Rows[0]["AccountName"].ToString();
                    accountTypeDropDownList.SelectedValue = dt.Rows[0]["AccountType"].ToString();
                    postedDropDownList.SelectedValue = dt.Rows[0]["IsPosted"].ToString();
                    totallingAccountNumberTextBox.Text = dt.Rows[0]["TotallingAccountNumber"].ToString();
                    useAsDropDownList.SelectedValue = dt.Rows[0]["UseAs"].ToString();
                    bankAccountNumberTextBox.Text = dt.Rows[0]["BankAccountNumber"].ToString();
                    descriptionTextBox.Text = dt.Rows[0]["Description"].ToString();
                }
                else
                {
                    msgbox.Visible = true; msgTitleLabel.Text = "Chart Of Account 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;
            }
        }
コード例 #2
0
ファイル: View.aspx.cs プロジェクト: atiburrahman09/Signbd
        protected void GetChartOfAccountById(string accountId)
        {
            ChartOfAccountBLL chartOfAccount = new ChartOfAccountBLL();

            try
            {
                DataTable dt = chartOfAccount.GetChartOfAccountById(accountId);

                if (dt.Rows.Count > 0)
                {
                    accountNameLabel.Text = dt.Rows[0]["AccountName"].ToString();
                    accountTypeLabel.Text = dt.Rows[0]["AccountTypeName"].ToString();
                    accountNumberLabel.Text = dt.Rows[0]["AccountNumber"].ToString();
                    totallingAccountNumberLabel.Text = dt.Rows[0]["TotallingAccountNumber"].ToString();
                    totallingAccountNameLabel.Text = dt.Rows[0]["TotallingAccountName"].ToString();
                    postedLabel.Text = dt.Rows[0]["IsPosted"].ToString();
                    accountLevelLabel.Text = dt.Rows[0]["AccountLevel"].ToString();
                    useAsLabel.Text = dt.Rows[0]["UseAs"].ToString();
                    bankAccountNumberLabel.Text = dt.Rows[0]["BankAccountNumber"].ToString();
                    descriptionLabel.Text = dt.Rows[0]["Description"].ToString();
                    group1Label.Text = dt.Rows[0]["Group1"].ToString();
                    group2Label.Text = dt.Rows[0]["Group2"].ToString();
                    group3Label.Text = dt.Rows[0]["Group3"].ToString();
                    group4Label.Text = dt.Rows[0]["Group4"].ToString();
                    group5Label.Text = dt.Rows[0]["Group5"].ToString();
                    group1NameLabel.Text = dt.Rows[0]["Group1Name"].ToString();
                    group2NameLabel.Text = dt.Rows[0]["Group2Name"].ToString();
                    group3NameLabel.Text = dt.Rows[0]["Group3Name"].ToString();
                    group4NameLabel.Text = dt.Rows[0]["Group4Name"].ToString();
                    group5NameLabel.Text = dt.Rows[0]["Group5Name"].ToString();
                }
                else
                {
                    msgbox.Visible = true; msgTitleLabel.Text = "Chart Of Account 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;
            }
        }
コード例 #3
0
        public static string AccountListView(string AccountId)
        {
            try
            {
                ChartOfAccountBLL chartOfAccount = new ChartOfAccountBLL();
                string json = JsonConvert.SerializeObject(chartOfAccount.GetChartOfAccountById(AccountId));
                json = json.Substring(1, json.Length - 2);

                return json;
            }
            catch (Exception)
            {
                throw;
            }
        }