Exemplo n.º 1
0
        private void LoadTeacher()
        {
            StaffDAO cd  = new StaffDAO();
            DataSet  set = cd.GetAllStaff();

            tabTeacher = set.Tables[0];
            repositoryItemLookUpEditTeacher.DataSource = tabTeacher;
        }
Exemplo n.º 2
0
        private void LoadStaff()
        {
            StaffDAO d   = new StaffDAO();
            DataSet  set = d.GetAllStaff();

            tablePost = set.Tables[0];
            gridCtrlPost.DataSource = tablePost;
            //DataRow newRow;
            //foreach (DataRow r in set.Tables[0].Rows)
            //{
            //    newRow = tablePost.NewRow();
            //    newRow["Name"] = r["Name"];
            //    newRow["StaffNumber"] = r["StaffNumber"];
            //    newRow["Sex"] = r["Sex"];
            //    newRow["Birthday"] = r["Birthday"];
            //    newRow["Phone"] = r["Phone"];
            //    newRow["IdCard"] = r["IdCard"];
            //    newRow["BankCard"] = r["BankCard"];
            //    tablePost.Rows.Add(newRow);
            //}

            //gridCtrlPost.DataSource = tablePost;
        }