Exemplo n.º 1
0
        private void LoadExtAccountInHiaraky()
        {
            DataTable tb        = MyAccount.GetAccountList(Program.AccountStatic.CompanyID, 1, 0);
            DataTable subtb     = MyAccount.GetSubAccountList(Program.AccountStatic.CompanyID, 1);
            DataSet   dsDataset = new DataSet();

            try
            {
                dsDataset.Tables.Add(tb);
                dsDataset.Tables.Add(subtb);
                DataRelation Datatablerelation = new DataRelation("Sub Account", dsDataset.Tables[0].Columns[0], dsDataset.Tables[1].Columns[1], false);
                dsDataset.Relations.Add(Datatablerelation);
                HanchyGrid.DataSource = dsDataset.Tables[0];
            }
            catch (Exception ex)
            {
            }
        }