コード例 #1
0
ファイル: frmAccount.cs プロジェクト: ePayment/account
        private void Clear()
        {
            txt_AccountID.Text             = string.Empty;
            txt_Ref.Text                   = string.Empty;
            txt_Name.Text                  = string.Empty;
            txt_CustomerID.Text            = string.Empty; oSelectedCustomer = null;
            lookUEdit_Account_GL.EditValue = string.Empty; oSelectedAccountGL = null;
            lookUEdit_BranchID.EditValue   = string.Empty; oSelectedBranch = null;
            txt_BranchName.Enabled         = false;
            dtOpenDate.DateTime            = System.DateTime.Now;
            dtLastDate.DateTime            = System.DateTime.Now;
            dtApprovedTime.Text            = string.Empty;
            cbo_Approved.SelectedIndex     = 0;
            dtClosedDate.DateTime          = System.DateTime.Now;
            cbo_Closed.SelectedIndex       = 0;
            cbo_Locked.SelectedIndex       = 0;
            cbo_CreditDebit.Text           = string.Empty;
            lookUEdit_Categories.EditValue = string.Empty; oSelectedCate = null;
            cbo_Ccy.SelectedIndex          = 0;
            txt_UserCreate.Text            = Program.CurrentUser.User_ID;

            txt_bCredit.Text     = string.Empty;
            txt_dCredit.Text     = string.Empty;
            txt_dDebit.Text      = string.Empty;
            txt_qCredit.Text     = string.Empty;
            txt_qDebit.Text      = string.Empty;
            txt_mCredit.Text     = string.Empty;
            txt_mDebit.Text      = string.Empty;
            txt_yCredit.Text     = string.Empty;
            txt_yDebit.Text      = string.Empty;
            txt_AmountBlock.Text = string.Empty;
            txt_Bal.Text         = string.Empty;
            txt_BalAvai.Text     = string.Empty;
        }
コード例 #2
0
 private void sbtnEdit_Click(object sender, EventArgs e)
 {
     Program.eButton = Program.Button.Edit;
     oAccountGL      = frmAccountGLList.oSelectedAccountGl;
     Enable(true);
     txt_AccountID.Focus();
 }
コード例 #3
0
 private void Clear()
 {
     txtID.Text         = string.Empty;
     txtName.Text       = string.Empty;
     txt_AccountGL.Text = string.Empty;
     oSelectedAccountGL = null;
     txtID.Focus();
 }
コード例 #4
0
 private void sbtnNew_Click(object sender, EventArgs e)
 {
     Program.eButton = Program.Button.New;
     Clear();
     Enable(true);
     oAccountGL = new Account.Common.Entities.Account_GL_Info();
     txt_AccountID.Focus();
 }
コード例 #5
0
ファイル: frmAccount.cs プロジェクト: ePayment/account
 private void lookUEdit_Account_GL_EditValueChanged(object sender, EventArgs e)
 {
     if (lookUEdit_Account_GL.ItemIndex < 0)
     {
         lookUEdit_Account_GL.EditValue = string.Empty;
         return;
     }
     oSelectedAccountGL = Program.lstAccountGL[lookUEdit_Account_GL.ItemIndex];
 }
コード例 #6
0
 private void Detail_AccountGL(Account.Common.Entities.Account_GL_Info oCurAccountGL)
 {
     txt_AccountID.Text   = oCurAccountGL.Account_ID;
     txt_AccountName.Text = oCurAccountGL.Name;
     if (oSelectedBranch != null)
     {
         lookUEditBranchID.EditValue = oSelectedBranch.ID;
         txt_BranchName.Text         = oSelectedBranch.Name;
     }
     txt_CreditDebit.EditValue = oCurAccountGL.CreditDebit;
     txt_Cyc.Text = oCurAccountGL.Ccy;
 }
コード例 #7
0
        private bool CheckValue()
        {
            if (txtID.Text.Trim() == string.Empty)
            {
                return(DialogMess("Bạn chưa nhập mã loại tài khoản!", MessageBoxIcon.Stop, txtID));
            }
            if (txtName.Text.Trim() == string.Empty)
            {
                return(DialogMess("Bạn chưa nhập tên loại tài khoản!", MessageBoxIcon.Stop, txtName));
            }
            oSelectedAccountGL = Account.UIProviders.UIAccount_GL.GetAccountGLByID(txt_AccountGL.Text);
            if (oSelectedAccountGL == null)
            {
                return(DialogMess("Tài khoản tổng hợp chưa đúng!", MessageBoxIcon.Stop, txt_AccountGL));
            }

            return(true);
        }
コード例 #8
0
ファイル: frmAccountGLList.cs プロジェクト: ePayment/account
 private void sbtnDetail_Click(object sender, EventArgs e)
 {
     if (gridView1.FocusedRowHandle < 0)
     {
         return;
     }
     else
     {
         string Account_ID = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, gcolAccountID).ToString();
         for (int i = 0; i < lstAccountGL.Count; i++)
         {
             if (lstAccountGL[i].Account_ID == Account_ID)
             {
                 oSelectedAccountGl = lstAccountGL[i];
                 frmAccountGL ofrm = new frmAccountGL();
                 ofrm.ShowDialog();
                 break;
             }
         }
     }
 }
コード例 #9
0
ファイル: frmAccount.cs プロジェクト: ePayment/account
        private void Detail_Account(Account.Common.Entities.Account_Info oCurAccount)
        {
            txt_AccountID.Text = oCurAccount.Account_ID;
            txt_Ref.Text       = oCurAccount.Reference;
            txt_Name.Text      = oCurAccount.Name;
            oSelectedCustomer  = Program.FindCustomer(oCurAccount.Customer_ID);
            if (oSelectedCustomer != null)
            {
                txt_CustomerID.Text = oSelectedCustomer.ID;
            }

            oSelectedAccountGL = Program.FindAccount_GL(oCurAccount.Account_GL);
            if (oSelectedAccountGL != null)
            {
                lookUEdit_Account_GL.EditValue = oSelectedAccountGL.Account_ID;
                lookUEdit_Account_GL.Text      = oSelectedAccountGL.Name;
            }
            oSelectedBranch = Program.FindBranch(oCurAccount.Branch_ID);
            if (oSelectedBranch != null)
            {
                lookUEdit_BranchID.EditValue = oSelectedBranch.ID;
                txt_BranchName.Text          = oSelectedBranch.Name;
            }
            dtOpenDate.EditValue     = oCurAccount.Open_Date;
            dtLastDate.EditValue     = oCurAccount.Last_Date;
            dtApprovedTime.EditValue = oCurAccount.ApprovedTime;
            if (oCurAccount.Approved == true)
            {
                cbo_Approved.SelectedIndex = 0;
            }
            else
            {
                cbo_Approved.SelectedIndex = 1;
            }

            dtClosedDate.EditValue = oCurAccount.Closed_date;
            if (oCurAccount.Closed == true)
            {
                cbo_Closed.SelectedIndex = 0;
            }
            else
            {
                cbo_Closed.SelectedIndex = 1;
            }
            if (oCurAccount.Locked == true)
            {
                cbo_Locked.SelectedIndex = 0;
            }
            else
            {
                cbo_Locked.SelectedIndex = 1;
            }
            oSelectedCate = Program.FindCategories(oCurAccount.Categories);
            if (oSelectedCate != null)
            {
                lookUEdit_Categories.EditValue = oSelectedCate.ID;
                lookUEdit_Categories.Text      = oSelectedCate.Name;
            }
            txt_UserCreate.Text = oCurAccount.UserCreate;

            txt_bCredit.EditValue = oCurAccount.b_Credit;
            for (int i = 0; i < arrAccType.Length; i++)
            {
                if (arrAccType[i].ToString() == oCurAccount.CreditDebit.ToString())
                {
                    cbo_CreditDebit.SelectedIndex = i;
                    break;
                }
            }
            oSelectedCcy = Program.FindCcy(oCurAccount.Ccy);
            if (oSelectedCcy != null)
            {
                cbo_Ccy.SelectedValue = oSelectedCcy;
                cbo_Ccy.SelectedValue = oSelectedCcy.Code;
            }

            txt_dCredit.EditValue     = oCurAccount.d_Credit;
            txt_dDebit.EditValue      = oCurAccount.d_Debit;
            txt_qCredit.EditValue     = oCurAccount.q_Credit;
            txt_qDebit.EditValue      = oCurAccount.q_Debit;
            txt_mCredit.EditValue     = oCurAccount.m_Credit;
            txt_mDebit.EditValue      = oCurAccount.m_Debit;
            txt_yCredit.EditValue     = oCurAccount.y_Credit;
            txt_yDebit.EditValue      = oCurAccount.y_Debit;
            txt_AmountBlock.EditValue = oCurAccount.Amount_Blocked;
            txt_Bal.EditValue         = oCurAccount.Balance;
            txt_BalAvai.EditValue     = oCurAccount.BalanceAvaiable;
            if (oCurAccount.Locked == true)
            {
                sbtnLocked.Text = "Bỏ khóa";
            }
            else
            {
                sbtnLocked.Text = "Khóa";
            }
        }