Exemplo n.º 1
0
        private void SearchForAccount(TextBox txt)
        {
            AccountSearch accSearch = new AccountSearch();

            accSearch.ShowDialog();
            txt.Text = accSearch.selectedAccountNumber;
        }
Exemplo n.º 2
0
        private void txt_AccountNumber1_DoubleClick(object sender, EventArgs e)
        {
            if (btnedit.Visible == false)
            {
                DialogResult myrst;
                myrst = MessageBox.Show("Are You Sure Exit Without Save", "General Ledger", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2);
                if (myrst == DialogResult.No)
                {
                    return;
                }
                else
                {
                    dgv.Enabled     = false;
                    btnedit.Visible = true;
                    btnSave.Visible = false;
                }
            }

            AccountSearch accSearch = new AccountSearch();

            accSearch.filter = " AND AccountTypeName <> 'Header'";
            accSearch.ShowDialog();
            if (accSearch.selectedAccountName != null && accSearch.selectedAccountNumber != null && accSearch.selectedAccountType != null && accSearch.selectedAccountType != "Header")
            {
                txt_AccountNumber1.Text = accSearch.selectedAccountNumber;
                SearchForGivenAccountNumber();
            }
        }
Exemplo n.º 3
0
        private void button2_Click(object sender, EventArgs e)
        {
            AccountSearch AccF = new AccountSearch();

            AccF.ShowDialog();
            this.txt_ARCode.Text = AccF.selectedAccountNumber;
        }
Exemplo n.º 4
0
        private void btn_CurrencyAccountBrowse_Click(object sender, EventArgs e)
        {
            AccountSearch accSearch = new AccountSearch();

            accSearch.ShowDialog();
            txt_CurrencyAccountNumber.Text = accSearch.selectedAccountNumber;
        }
Exemplo n.º 5
0
        private void button1_Click(object sender, EventArgs e)
        {
            AccountSearch Acc = new AccountSearch();

            Acc.filter = " AND AccountTypeName <> 'Header'";
            Acc.ShowDialog();
            this.txtAccount.Text = Acc.selectedAccountNumber;
        }
Exemplo n.º 6
0
        private void btn_Bank_GL_Account_Click(object sender, EventArgs e)
        {
            AccountSearch accSearch = new AccountSearch();

            accSearch.filter = " AND AccountTypeName <> 'Header'";
            accSearch.ShowDialog();
            if (accSearch.selectedAccountName != null)
            {
                txt_Bank_GL_Account.Text = accSearch.selectedAccountNumber.ToString();
            }
        }
Exemplo n.º 7
0
        private void txt_AccountNumber1_DoubleClick(object sender, EventArgs e)
        {
            AccountSearch accSearch = new AccountSearch();

            accSearch.filter = " AND AccountTypeName <> 'Header'";
            accSearch.ShowDialog();
            if (accSearch.selectedAccountName != null && accSearch.selectedAccountNumber != null && accSearch.selectedAccountType != null && accSearch.selectedAccountType != "Header")
            {
                txt_AccountNumber1.Text = accSearch.selectedAccountNumber;
            }
        }
Exemplo n.º 8
0
        private void txtRetained_DoubleClick(object sender, EventArgs e)
        {
            AccountSearch accSearch = new AccountSearch();

            accSearch.filter = " AND AccountTypeName = 'Equity'";
            accSearch.ShowDialog();
            if (accSearch.selectedAccountName != null)
            {
                txtRetained.Text = accSearch.selectedAccountNumber.ToString();
            }
        }
Exemplo n.º 9
0
        private void txtIncome_DoubleClick(object sender, EventArgs e)
        {
            AccountSearch accSearch = new AccountSearch();

            accSearch.filter = " AND AccountTypeName IN ('Liability','Revenue')";
            accSearch.ShowDialog();
            if (accSearch.selectedAccountName != null)
            {
                txtIncome.Text = accSearch.selectedAccountNumber.ToString();
            }
        }
Exemplo n.º 10
0
        private void dgv_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            DataRow dr;

            if (GeneralFunctions.ValidateString(txt_TemplateCode.Text, "Please Specify the template code") &&
                GeneralFunctions.ValidateString(txt_TemplateName.Text, "Please Specify the template name") &&
                GeneralFunctions.ValidateComboBox(cb_JournalCode, "Please Specify the appropriate Journal Code of the given Template Code"))
            {
                AccountSearch accSearch = new AccountSearch();
                accSearch.ShowDialog();
                if (accSearch.selectedAccountName != null && accSearch.selectedAccountNumber != null)
                {
                    dtTemplateAccounts.Rows.RemoveAt(dtTemplateAccounts.Rows.Count - 1);
                    dr = dtTemplateAccounts.NewRow();
                    dr["AccountTypeName"] = accSearch.selectedAccountType;
                    dr["AccountID"]       = GeneralFunctions.TemplateAccounts;
                    GeneralFunctions.TemplateAccounts++;
                    dr["AccountNumber"] = accSearch.selectedAccountNumber;
                    dr["AccountName"]   = accSearch.selectedAccountName;
                    dtTemplateAccounts.Rows.Add(dr);

                    dr = dtTemplateAccounts.NewRow();
                    dtTemplateAccounts.Rows.Add(dr);
                }

                if (accSearch.selectedAccountsTable != null && accSearch.selectedAccountsTable.Rows.Count != 0)
                {
                    dtTemplateAccounts.Rows.RemoveAt(dtTemplateAccounts.Rows.Count - 1);
                    for (int i = 0; i < accSearch.selectedAccountsTable.Rows.Count; i++)
                    {
                        dr = dtTemplateAccounts.NewRow();
                        dr["AccountID"] = GeneralFunctions.TemplateAccounts;
                        GeneralFunctions.TemplateAccounts++;
                        dr["AccountTypeName"] = accSearch.selectedAccountsTable.Rows[i]["AccountTypeName"];
                        dr["AccountNumber"]   = accSearch.selectedAccountsTable.Rows[i]["AccountNumber"];
                        dr["AccountName"]     = accSearch.selectedAccountsTable.Rows[i]["AccountName"];
                        if (dr["AccountTypeName"].ToString().ToLower() != "header" && dr["AccountTypeName"].ToString().ToLower() != "statistical")
                        {
                            dr["Debit"]  = value;
                            dr["Credit"] = value;
                            dr["Units"]  = 0;
                        }
                        dtTemplateAccounts.Rows.Add(dr);
                    }
                    dr = dtTemplateAccounts.NewRow();
                    dtTemplateAccounts.Rows.Add(dr);
                }
            }
        }
Exemplo n.º 11
0
 private void txt_FAccountNumber_DoubleClick(object sender, EventArgs e)
 {
     try
     {
         AccountSearch accSearch = new AccountSearch();
         accSearch.filter = " AND AccountTypeName <> 'Header'";
         accSearch.ShowDialog();
         if (accSearch.selectedAccountName != null && accSearch.selectedAccountNumber != null && accSearch.selectedAccountType != null && accSearch.selectedAccountType != "Header")
         {
             txt_FAccountNumber.Text = accSearch.selectedAccountNumber;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "System Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Exemplo n.º 12
0
        private void toolStripMenuItem3_Click(object sender, EventArgs e)
        {
            AccountSearch accountsearch = new AccountSearch();

            accountsearch.ShowDialog();
        }
Exemplo n.º 13
0
        private void btnAccountSearch_Click(object sender, EventArgs e)
        {
            AccountSearch accountsearch = new AccountSearch();

            accountsearch.ShowDialog();
        }