public NhomDonViData obj_NhomDonVi(String ParentID, String iID_MaTrangThaiDuyet, String Thang_Quy, String LoaiThang_Quy, String iID_MaDonVi, String iID_MaDanhMuc, String MaND)
 {
     NhomDonViData _data = new NhomDonViData();
     //DataTable dtNhomDonVi = DanhSachNhomDonVi(iID_MaTrangThaiDuyet, Thang_Quy, LoaiThang_Quy, MaND);
     //SelectOptionList slNhomDonVi = new SelectOptionList(dtNhomDonVi, "iID_MaDanhMuc", "TenDM");
     //_data.iID_MaDanhMuc = MyHtmlHelper.DropDownList(ParentID, slNhomDonVi, iID_MaDanhMuc, "iID_MaDanhMuc", "", "class=\"input1_2\" style=\"width: 100%\" onChange=ChonDV()");
     //dtNhomDonVi.Dispose();
     //DataTable dtDonVi = DanhSachDonVi(iID_MaTrangThaiDuyet, Thang_Quy, LoaiThang_Quy, iID_MaDanhMuc, MaND);
     //String ViewNam = "~/Views/DungChung/DonVi/DonVi_DanhSach.ascx";
     //DanhSachDonViModels Model = new DanhSachDonViModels(MaND, iID_MaDonVi, dtDonVi, "");
     //String strDonVi = HamChung.RenderPartialViewToStringLoad(ViewNam, Model, this);
     //_data.iID_MaDonVi = strDonVi;
     //dtDonVi.Dispose();
     return _data;
 }
        public JsonResult ds_NhomDonVi(String ParentID, String iID_MaTrangThaiDuyet, String Thang_Quy, String LoaiThang_Quy, String iID_MaDonVi, String iID_MaDanhMuc)
        {
            String MaND = User.Identity.Name;
            NhomDonViData _data = new NhomDonViData();
            DataTable dtNhomDonVi = DanhSachNhomDonVi(iID_MaTrangThaiDuyet, Thang_Quy, LoaiThang_Quy, MaND);
            SelectOptionList slNhomDonVi = new SelectOptionList(dtNhomDonVi, "iID_MaDanhMuc", "TenDM");
            _data.iID_MaDanhMuc = MyHtmlHelper.DropDownList(ParentID, slNhomDonVi, iID_MaDanhMuc, "iID_MaDanhMuc", "", "class=\"input1_2\" style=\"width: 50%\" onChange=ChonDV()");
            if (iID_MaDanhMuc == "undefined")
            {
                iID_MaDanhMuc = Guid.Empty.ToString();
            }
            dtNhomDonVi.Dispose();

            DataTable dtDonVi = DanhSachDonVi(iID_MaTrangThaiDuyet, Thang_Quy, LoaiThang_Quy, iID_MaDanhMuc, MaND);
            String ViewNam = "~/Views/DungChung/DonVi/DonVi_DanhSach.ascx";
            DanhSachDonViModels Model = new DanhSachDonViModels(MaND, iID_MaDonVi, dtDonVi, "");
            String strDonVi = HamChung.RenderPartialViewToStringLoad(ViewNam, Model, this);
            _data.iID_MaDonVi = strDonVi;
            dtDonVi.Dispose();
            return Json(_data, JsonRequestBehavior.AllowGet);
        }