コード例 #1
0
 public static List<AccountCategory> GetAllAccountCategory()
 {
     List<AccountCategory> result = new List<AccountCategory>();
     NewAppsCnn newAppsCnn = new NewAppsCnn(AppSettings.CrAppSettings.NewAppsConnectionString);
     var dbAccountCategorys = from g in newAppsCnn.Acc_AccountCategory select g;
     foreach (var dbAccountCategory in dbAccountCategorys)
     {
         AccountCategory accountcategory = new AccountCategory();
         accountcategory.FromDbAccountCategory(dbAccountCategory);
         result.Add(accountcategory);
     }
     return result;
 }
コード例 #2
0
 public static AccountCategory FindByAccountCategoryID(int _VaidationID)
 {
     NewAppsCnn newAppsCnn = new NewAppsCnn(AppSettings.CrAppSettings.NewAppsConnectionString);
     var dbAccountCategorys = from u in newAppsCnn.Acc_AccountCategory where u.CategoryId == _VaidationID select u;
     if (dbAccountCategorys.Count() > 0)
     {
         Acc_AccountCategory dbAccountCategory = dbAccountCategorys.First();
         AccountCategory accountcategory = new AccountCategory();
         accountcategory.FromDbAccountCategory(dbAccountCategory);
         accountcategory.IsNew = false;
         return accountcategory;
     }
     else
         return null;
 }
コード例 #3
0
 private void addToolStripMenuItem_Click(object sender, EventArgs e)
 {
     CrAccount = new BackOfficeBL.Accounting.Account();
     CrAccounttype = new BackOfficeBL.Accounting.Accounttype();
     CrAccountCategory = new BackOfficeBL.Accounting.AccountCategory();
     CrAccount.AccountID = Account.getNewId(trvAccountTree.SelectedNode.Tag.ToString(),false);
     if (trvAccountTree.SelectedNode != null && trvAccountTree.SelectedNode.ToString() != "")
     {
         var parent = Account.FindByAccountID(trvAccountTree.SelectedNode.Tag.ToString());
         CrAccount.AccountTypeId = parent.AccountTypeId;
         CrAccount.ParentId = trvAccountTree.SelectedNode.ToString();
     }
     ShowGUI();
     this.FormStatus = FormStatusEnum.AddNew;
     //trvAccountTree.Enabled = false;
 }
コード例 #4
0
 private void frmAccountTree_AddNew(object sender, ref bool _status)
 {
     CrAccount = new BackOfficeBL.Accounting.Account();
     CrAccounttype = new BackOfficeBL.Accounting.Accounttype();
     CrAccountCategory = new BackOfficeBL.Accounting.AccountCategory();
     txtAccountNo.Text = Account.getNewId((trvAccountTree.SelectedNode != null ? trvAccountTree.SelectedNode.Tag.ToString() : ""),false);
 }