コード例 #1
0
 public static List<Accounttype> GetAllAccounttype()
 {
     List<Accounttype> result = new List<Accounttype>();
     NewAppsCnn newAppsCnn = new NewAppsCnn(AppSettings.CrAppSettings.NewAppsConnectionString);
     var dbAccounttypes = from g in newAppsCnn.Acc_Accountype select g;
     foreach (var dbAccounttype in dbAccounttypes)
     {
         Accounttype accounttype = new Accounttype();
         accounttype.FromDbAccounttype(dbAccounttype);
         result.Add(accounttype);
     }
     return result;
 }
コード例 #2
0
 public static Accounttype FindByAccounttypeID(int _VaidationID)
 {
     NewAppsCnn newAppsCnn = new NewAppsCnn(AppSettings.CrAppSettings.NewAppsConnectionString);
     var dbAccounttypes = from u in newAppsCnn.Acc_Accountype where u.TypeID == _VaidationID select u;
     if (dbAccounttypes.Count() > 0)
     {
         Acc_Accountype dbAccounttype = dbAccounttypes.First();
         Accounttype accounttype = new Accounttype();
         accounttype.FromDbAccounttype(dbAccounttype);
         accounttype.IsNew = false;
         return accounttype;
     }
     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);
 }