Example #1
0
 private void ToolStripMenuItemThemDanhMuc_Click(object sender, EventArgs e)
 {
     string s = advTreeThucDon.SelectedNode.Name;
     try
     {
        int DanhMuc = Convert.ToInt32(s);
         // load Nhom danh muc
        ThucDon.ModuleThucDon load = new ThucDon.ModuleThucDon();
        DataTable dt = load.LoadDanhMucTheoMaDanhMuc(DanhMuc);
        int NhomDanhMuc = Convert.ToInt32(dt.Rows[0][2].ToString());
        ThemDanhMuc them = new ThemDanhMuc(NhomDanhMuc);
        them.ShowDialog();
        LoadTreeViewThucDon();
     }
     catch
     {
         int NhomDanhMuc = Convert.ToInt32(s.Substring(1));
         ThemDanhMuc them = new ThemDanhMuc(NhomDanhMuc);
         them.ShowDialog();
         LoadTreeViewThucDon();
     }
 }
Example #2
0
 private void SuaDanhMuc_Load(object sender, EventArgs e)
 {
     ThucDon.ModuleThucDon thucdon = new ThucDon.ModuleThucDon();
     DataTable dt = thucdon.LoadDanhMucTheoMaDanhMuc(Ma);
     textBoxX1.Text = dt.Rows[0][1].ToString();
 }