Exemple #1
0
        private void LoadModule()
        {
            if (grdvGroup.GetRowCellValue(grdvGroup.FocusedRowHandle, colGroupID) != null)
            {

                busGroupModule = new BUS.BUStblGROUPMODULE();
                busModule = new BUS.BUStblMODULE();
                int _groupID = (int)grdvGroup.GetRowCellValue(grdvGroup.FocusedRowHandle, colGroupID);
                var _Module = from a in busGroupModule.LayTatCatblGROUPMODULE()
                             join b in busModule.LayTatCatblMODULE() on a.MODULEID equals b.MODULEID
                             where a.GROUPID == _groupID
                             orderby a.MODULEID ascending
                             select new
                             {
                                 ModuleID = a.MODULEID,
                                 ModuleName = b.MODULENAME,
                                 Value = a.VALUE
                             };
                DataTable dt = clsXuLy.ConvertDataTable(_Module.ToList());
                grdModule.DataSource = dt;
            }
            else
                grdModule.DataSource = null;
        }
Exemple #2
0
 private void LoadFunction()
 {
     if (grdvGroup.GetRowCellValue(grdvGroup.FocusedRowHandle, colGroupID) != null)
     {
         busFunction = new BUS.BUStblFUNCTION();
         busGroupFunction = new BUS.BUStblGROUP_FUNCTION();
         busModule = new BUS.BUStblMODULE();
         int _groupID = (int)grdvGroup.GetRowCellValue(grdvGroup.FocusedRowHandle, colGroupID);
         var _Func = (from a in busGroupFunction.LayTatCatblGROUP_FUNCTION()
                      join b in busModule.LayTatCatblMODULE() on a.MODULEID equals b.MODULEID
                      join c in busFunction.LayTatCatblFUNCTION() on a.FUNCTIONID equals c.FUNCTIONID
                      where a.GROUPID == _groupID
                      orderby a.MODULEID ascending
                      select new
                      {
                          ModuleID = a.MODULEID,
                          ModuleName = b.MODULENAME,
                          FunctionID = a.FUNCTIONID,
                          FunctionName = c.FUNCTIONNAME,
                          Value = a.VALUE
                      });
         DataTable dt = clsXuLy.ConvertDataTable(_Func.ToList());
         grdFunction.DataSource = dt;
     }
     else
         grdFunction.DataSource = null;
 }