示例#1
0
        private void SetDataSource()
        {
            if (lstUserInfo.Count == 0)
            {
                dtTemp.Rows.Clear();
                return;
            }
            dtTemp.Rows.Clear();
            Account.Common.Entities.Branches_Info oBranch = null;
            for (int i = 0; i < lstUserInfo.Count; i++)
            {
                DataRow oRow = dtTemp.NewRow();
                oRow["User_ID"]    = lstUserInfo[i].User_ID;
                oRow["FullName"]   = lstUserInfo[i].FullName;
                oRow["Password"]   = lstUserInfo[i].Password;
                oBranch            = Program.FindBranch(lstUserInfo[i].Branch_ID);
                oRow["BranchID"]   = oBranch.ID;
                oRow["BranchName"] = oBranch.Name;
                oRow["LastLogin"]  = lstUserInfo[i].LastLogin;
                oRow["LastLogout"] = lstUserInfo[i].LastLogout;

                dtTemp.Rows.Add(oRow);
            }

            grdCtrlAccountGL.DataSource = null;
            grdCtrlAccountGL.DataSource = dtTemp;
        }
示例#2
0
 private void SetDataSource()
 {
     if (lstTranDayInfo.Count == 0)
     {
         dtTemp.Rows.Clear();
         return;
     }
     dtTemp.Rows.Clear();
     Account.Common.Entities.Branches_Info oBranch = new Account.Common.Entities.Branches_Info();
     for (int i = 0; i < lstTranDayInfo.Count; i++)
     {
         DataRow oRow = dtTemp.NewRow();
         oRow["DocID"]         = lstTranDayInfo[i].DocID;
         oRow["Trace"]         = lstTranDayInfo[i].Trace;
         oRow["TransDate"]     = lstTranDayInfo[i].TransDate;
         oBranch               = Program.FindBranch(lstTranDayInfo[i].Branch_ID);
         oRow["Branch_ID"]     = oBranch.ID;
         oRow["Branch_Name"]   = oBranch.Name;
         oRow["Status"]        = lstTranDayInfo[i].Status;
         oRow["AllowReverse"]  = lstTranDayInfo[i].AllowReverse;
         oRow["Verified"]      = lstTranDayInfo[i].Verified;
         oRow["Verified_User"] = lstTranDayInfo[i].Verified_User;
         dtTemp.Rows.Add(oRow);
     }
     grdCtrlTransDay.DataSource = null;
     grdCtrlTransDay.DataSource = dtTemp;
 }
示例#3
0
 private void SetDataSource()
 {
     if (lstCustomerInfo.Count == 0)
     {
         dtTemp.Rows.Clear();
         return;
     }
     dtTemp.Rows.Clear();
     Account.Common.Entities.Branches_Info oBranch = new Account.Common.Entities.Branches_Info();
     for (int i = 0; i < lstCustomerInfo.Count; i++)
     {
         DataRow oRow = dtTemp.NewRow();
         oRow["ID"]          = lstCustomerInfo[i].ID;
         oRow["Cust_Ref"]    = lstCustomerInfo[i].Reference;
         oRow["Name"]        = lstCustomerInfo[i].Name;
         oRow["VATCode"]     = lstCustomerInfo[i].VATCode;
         oRow["Cust_Cert"]   = lstCustomerInfo[i].Cust_Cert;
         oBranch             = Program.FindBranch(lstCustomerInfo[i].Branch_ID);
         oRow["Branch_ID"]   = oBranch.ID;
         oRow["Branch_Name"] = oBranch.Name;
         dtTemp.Rows.Add(oRow);
     }
     grdCtrlAccountGL.DataSource = null;
     grdCtrlAccountGL.DataSource = dtTemp;
 }
示例#4
0
        private void SetDataSource()
        {
            if (lstChannelInfo.Count == 0)
            {
                dtTemp.Rows.Clear();
                return;
            }
            dtTemp.Rows.Clear();
            Account.Common.Entities.Branches_Info oBranch = null;
            for (int i = 0; i < lstChannelInfo.Count; i++)
            {
                DataRow oRow = dtTemp.NewRow();
                oRow["ID"]            = lstChannelInfo[i].ID;
                oRow["Name"]          = lstChannelInfo[i].Name;
                oRow["Service_port"]  = lstChannelInfo[i].Service_Port;
                oRow["ISO_Port"]      = lstChannelInfo[i].ISO_Port;
                oRow["Listener_host"] = lstChannelInfo[i].Listener_Host;
                oRow["BranchID"]      = lstChannelInfo[i].Branch;
                oRow["Curency_Code"]  = lstChannelInfo[i].Currency_Code;
                oRow["Security"]      = lstChannelInfo[i].Security;
                oRow["Private_Key"]   = lstChannelInfo[i].Key;
                oRow["Descript"]      = lstChannelInfo[i].Descript;
                dtTemp.Rows.Add(oRow);
            }

            grdCtrlAccountGL.DataSource = null;
            grdCtrlAccountGL.DataSource = dtTemp;
        }
示例#5
0
        private void Save_AccountGL()
        {
            if (oAccountGL == null)
            {
                return;
            }

            oAccountGL.Account_ID = txt_AccountID.Text;
            oAccountGL.Name       = txt_AccountName.Text;
            oSelectedBranch       = Program.FindBranch(lookUEditBranchID.EditValue.ToString());
            oAccountGL.Branch_ID  = oSelectedBranch.ID;
            oAccountGL.Name       = oSelectedBranch.Name;
            //oAccountGL.CreditDebit = Convert.ToDecimal(txt_CreditDebit.EditValue.ToString());
            if (Program.eButton == Program.Button.New)
            {
                Insert_AccountGL();
            }
            else if (Program.eButton == Program.Button.Edit)
            {
                Update_AccountGL();
            }
            else if (Program.eButton == Program.Button.Del)
            {
                Delete_AccountGL();
            }
        }
示例#6
0
 private void sbtnNew_Click(object sender, EventArgs e)
 {
     Program.eButton = Program.Button.New;
     oBranch         = new Account.Common.Entities.Branches_Info();
     Clear();
     Enable(true);
 }
示例#7
0
 private void Save_Branch()
 {
     try
     {
         if (oBranch == null)
         {
             oBranch = new Account.Common.Entities.Branches_Info();
         }
         oBranch.ID   = txt_ID.Text.Trim();
         oBranch.Name = mEdit_Name.Text;
         if (Program.eButton == Program.Button.Edit)
         {
             Edit_Branch();
         }
         else if (Program.eButton == Program.Button.New)
         {
             Insert_Branch();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error);
         return;
     }
 }
示例#8
0
        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;
        }
示例#9
0
        private void Detail_Customer(Account.Common.Entities.Customer_Info oCurCustomer)
        {
            txt_ID.Text                  = oCurCustomer.ID;
            txt_Ref.Text                 = oCurCustomer.Reference;
            txt_Name.Text                = oCurCustomer.Name;
            txt_FamilyName.Text          = oCurCustomer.FamilyName;
            txt_ShortName.Text           = oCurCustomer.ShortName;
            txt_Address.Text             = oCurCustomer.Address;
            txt_Address1.Text            = oCurCustomer.Address1;
            txt_EName.Text               = oCurCustomer.EName;
            txt_EAddress.Text            = oCurCustomer.EAddress;
            txt_Cust_Cert.Text           = oCurCustomer.Cust_Cert;
            txt_Cust_Cert_Type.Text      = oCurCustomer.Cust_Cert_Type;
            dt_Cust_Cert_Dated.EditValue = oCurCustomer.Cust_Cert_Dated;
            txt_Cust_Cert_By.Text        = oCurCustomer.Cust_Cert_By;
            txt_Tell.Text                = oCurCustomer.Tel;
            txt_Handphone.Text           = oCurCustomer.Handphone;
            txt_Tel1.Text                = oCurCustomer.Tel1;
            txt_Fax.Text                 = oCurCustomer.Fax;
            txt_Email.Text               = oCurCustomer.Email;
            txt_WebSite.Text             = oCurCustomer.Website;
            //if (oCurCustomer.Locked == true) cbo_Locked.SelectedIndex = 0;
            //else cbo_Locked.SelectedIndex = 1;
            //txt_UserCreate.Text = Program.User.User_ID;
            txt_VATCode.Text = oCurCustomer.VATCode;
            oSelectedBranch  = Program.FindBranch(oCurCustomer.Branch_ID);
            if (oSelectedBranch != null)
            {
                lookUEdit_BranchID.EditValue = oSelectedBranch.ID;
                txt_BranchName.Text          = oSelectedBranch.Name;
            }
            dt_ApprovedTime.EditValue = oCurCustomer.ApprovedTime;
            dt_Last_Date.EditValue    = oCurCustomer.LastUpdate;

            if (oCurCustomer.Approved == true)
            {
                cbo_Approved.SelectedIndex = 0;
            }
            else
            {
                cbo_Approved.SelectedIndex = 1;
            }
            dt_DateCreated.EditValue = oCurCustomer.DateCreated;

            oSelectedSector = new Account.Common.Entities.Sector_Info();
            oSelectedSector = Program.FindSector(oCurCustomer.Sector);
            if (oSelectedSector != null)
            {
                lookUEdit_Sector.EditValue = oSelectedSector.ID + "-" + oSelectedSector.Name;
            }

            oSelectedIndustry = new Account.Common.Entities.Industry_Info();
            oSelectedIndustry = Program.FindIndustry(oCurCustomer.Industry);
            if (oSelectedIndustry != null)
            {
                lookUEdit_Industry.EditValue = oSelectedIndustry.ID + "-" + oSelectedIndustry.Name;
            }
        }
示例#10
0
        private void Detail_Channel(Account.Common.Entities.Channel_Info oCurChannel)
        {
            txt_Name.Text         = oCurChannel.Name;
            txt_ISOPort.Text      = oCurChannel.ISO_Port.ToString();
            txt_ServicePort.Text  = oCurChannel.Service_Port.ToString();
            txt_ListenerHost.Text = oCurChannel.Listener_Host;
            if (!string.IsNullOrEmpty(oCurChannel.Branch))
            {
                oSelectedBranch = Program.FindBranch(oCurChannel.Branch);
                if (oSelectedBranch != null)
                {
                    lookUEditBranchID.EditValue = oSelectedBranch.ID;
                    txt_BranchName.Text         = oSelectedBranch.Name;
                }
            }
            txt_UserID.Text          = oCurChannel.UserLogin;
            txt_UserCreate.Text      = oCurChannel.User_Create;
            lookUpEdit_Ccy.EditValue = oCurChannel.Currency_Code;
            if (oCurChannel.Security == true)
            {
                cbo_Security.SelectedIndex = 0;
            }
            else
            {
                cbo_Security.SelectedIndex = 1;
            }
            dtCreatedDate.DateTime = oCurChannel.Create_Date;

            oSelectedCate = Program.FindCategories(oCurChannel.Categories);
            if (oSelectedCate != null)
            {
                lookUEdit_Categories.EditValue = oSelectedCate.ID;
            }

            oSelectedTranCode = Program.FindTranCode(oCurChannel.AddFund_Trancode);
            if (oSelectedTranCode != null)
            {
                lue_AddFund.EditValue = oSelectedTranCode.Code;
            }

            oSelectedTranCode = Program.FindTranCode(oCurChannel.Retail_Trancode);
            if (oSelectedTranCode != null)
            {
                lue_Retail.EditValue = oSelectedTranCode.Code;
            }

            oSelectedTranCode = Program.FindTranCode(oCurChannel.FundTranfer_Trancode);
            if (oSelectedTranCode != null)
            {
                lue_FundTransfer.EditValue = oSelectedTranCode.Code;
            }

            txt_PrivateKey.Text = oCurChannel.Key;
            txt_Descript.Text   = oCurChannel.Descript;

            dtLastDate.DateTime    = oCurChannel.Last_Date;
            dtCreatedDate.DateTime = oCurChannel.Create_Date;
        }
示例#11
0
 private void sbtnDel_Click(object sender, EventArgs e)
 {
     Program.eButton = Program.Button.Del;
     oBranch         = oSelectedBranch;
     Delete_Branch();
     Clear();
     //Enable(true);
     SetDataSource();
 }
示例#12
0
 private void lookUEditBranchID_EditValueChanged(object sender, EventArgs e)
 {
     if (lookUEditBranchID.ItemIndex < 0)
     {
         lookUEditBranchID.EditValue = string.Empty;
         return;
     }
     oSelectedBranch     = Program.lstBranch[lookUEditBranchID.ItemIndex];
     txt_BranchName.Text = oSelectedBranch.Name;
 }
示例#13
0
 private void Clear()
 {
     txt_User_ID.Text             = string.Empty;
     txt_FullName.Text            = string.Empty;
     txt_Password.Text            = string.Empty;
     txt_TID.Text                 = string.Empty;
     lookUEdit_BranchID.EditValue = string.Empty; oSelectedBranch = null;
     txt_BranchName.Text          = string.Empty;
     chk_IsAdmin.EditValue        = string.Empty;
     dtLastLogin.EditValue        = null;
     dtLastLogout.EditValue       = null;
 }
示例#14
0
 private void Detail_Branch(Account.Common.Entities.Branches_Info oCurBranch)
 {
     if (gridView1.FocusedRowHandle < 0 || oCurBranch == null)
     {
         return;
     }
     else
     {
         //oCurBranch = (Account.Common.Entities.Branches_Info)gridView1.GetRow(gridView1.FocusedRowHandle);
         txt_ID.Text     = oCurBranch.ID;
         mEdit_Name.Text = oCurBranch.Name;
     }
 }
示例#15
0
 private void Detail_TranCode(Account.Common.Entities.Trancode_Info oCurTranCode)
 {
     txt_Code.Text               = oCurTranCode.Code;
     txt_Name.Text               = oCurTranCode.Name;
     cbo_Status.EditValue        = oCurTranCode.Status;
     cbo_CodeType.EditValue      = oCurTranCode.CodeType;
     lookUpEdit_Categories.Text  = oCurTranCode.Categories;
     oSelectedBranch             = Program.FindBranch(oCurTranCode.Branch_ID);
     lookUEditBranchID.EditValue = oSelectedBranch.ID;
     txt_BranchName.Text         = oSelectedBranch.Name;
     txt_UserCreate.Text         = oCurTranCode.UserCreate;
     txt_NextCode.Text           = oCurTranCode.NextCode;
     txt_Descript.Text           = oCurTranCode.Descript;
     dtDateCreated.DateTime      = oCurTranCode.DateCreated;
 }
示例#16
0
 private void Detail_UserProfile(Account.Common.Entities.User_Info oCurUserProfile)
 {
     txt_User_ID.Text  = oCurUserProfile.User_ID;
     txt_FullName.Text = oCurUserProfile.FullName;
     txt_Password.Text = oCurUserProfile.Password;
     oSelectedBranch   = Program.FindBranch(oCurUserProfile.Branch_ID);
     if (oSelectedBranch != null)
     {
         lookUEdit_BranchID.EditValue = oSelectedBranch.ID;
         txt_BranchName.Text          = oSelectedBranch.Name;
     }
     chk_IsAdmin.EditValue  = oCurUserProfile.IsAdministrator;
     dtLastLogin.EditValue  = oCurUserProfile.LastLogin;
     dtLastLogout.EditValue = oCurUserProfile.LastLogout;
 }
示例#17
0
 private void gridView1_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e)
 {
     if (gridView1.FocusedRowHandle < 0)
     {
         return;
     }
     else
     {
         string ID = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, gcolID).ToString();
         for (int i = 0; i < Program.lstBranch.Count; i++)
         {
             if (Program.lstBranch[i].ID == ID)
             {
                 oSelectedBranch = Program.lstBranch[i];
                 break;
             }
         }
         Detail_Branch(oSelectedBranch);
     }
 }
示例#18
0
 private void Detail_TranCode(Account.Common.Entities.Trancode_Info oCurTranCode)
 {
     txt_Code.Text               = oCurTranCode.Code;
     txt_Name.Text               = oCurTranCode.Name;
     txt_Categories.Text         = oCurTranCode.Categories;
     txt_RefNum.Text             = oCurTranCode.RefNum;
     oSelectedBranch             = Program.FindBranch(oCurTranCode.Branch_ID);
     lookUEditBranchID.EditValue = oSelectedBranch.ID;
     txt_BranchName.Text         = oSelectedBranch.Name;
     //txt_UserCreate.Text = Program.CurrentUser.FullName;
     txt_NextCode.Text = oCurTranCode.NextCode;
     if (oCurTranCode.Report == true)
     {
         cbo_Report.SelectedIndex = 0;
     }
     else
     {
         cbo_Report.SelectedIndex = 1;
     }
     txt_Formula.Text  = oCurTranCode.Formula;
     txt_CostCode.Text = oCurTranCode.CostCode;
     if (oCurTranCode.Display == true)
     {
         cbo_Display.SelectedIndex = 0;
     }
     else
     {
         cbo_Display.SelectedIndex = 1;
     }
     if (oCurTranCode.CheckOn == true)
     {
         cbo_CheckOn.SelectedIndex = 0;
     }
     else
     {
         cbo_CheckOn.SelectedIndex = 1;
     }
     dtDateCreated.DateTime = oCurTranCode.DateCreated;
 }
示例#19
0
        private void SetDataSource()
        {
            if (lstAccountGL.Count == 0)
            {
                dtTemp.Rows.Clear();
                return;
            }
            dtTemp.Rows.Clear();
            Account.Common.Entities.Branches_Info oBranch = new Account.Common.Entities.Branches_Info();

            for (int i = 0; i < lstAccountGL.Count; i++)
            {
                DataRow oRow = dtTemp.NewRow();
                oRow["Account_ID"]  = lstAccountGL[i].Account_ID;
                oRow["Name"]        = lstAccountGL[i].Name;
                oBranch             = Program.FindBranch(lstAccountGL[i].Branch_ID);
                oRow["Branch_ID"]   = oBranch.ID;
                oRow["Branch_Name"] = oBranch.Name;
                dtTemp.Rows.Add(oRow);
            }
            grdCtrlAccountGL.DataSource = null;
            grdCtrlAccountGL.DataSource = dtTemp;
        }
示例#20
0
        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";
            }
        }
示例#21
0
 private void sbtnEdit_Click(object sender, EventArgs e)
 {
     Program.eButton = Program.Button.Edit;
     oBranch         = oSelectedBranch;
     Enable(true);
 }