/// <summary>
 /// 批量保存角色模块权限
 /// </summary>
 /// <param name="myOperatorInfo">操作员信息</param>
 /// <param name="myDataTable">数据表</param>
 /// <param name="paramID">角色代码</param>
 /// <returns>音响的行数</returns>
 public DataTable BatchSave(BaseOperatorInfo myOperatorInfo, DataTable myDataTable, string paramID)
 {
     // 写入调试信息
     #if (DEBUG)
         int milliStart = BaseBusinessLogic.Instance.StartDebug(myOperatorInfo, MethodBase.GetCurrentMethod());
     #endif
     IBaseDbConnection myDbConnection = new OleDbHelper();
     try
     {
         myDbConnection.Open();
         BaseRolePermissionImpl myRolePermissionImpl = new BaseRolePermissionImpl(myDbConnection, myOperatorInfo);
         myRolePermissionImpl.BatchSave(myDataTable);
         myDataTable = myRolePermissionImpl.GetListByRole(paramID);
         BaseLogDao.Instance.Add(myDbConnection, myOperatorInfo);
         // 添加相应的权限数据
         // myDataSet.Tables.Add(BasePermissionCheck.Instance.GetAuthorization(myDbConnection, myOperatorInfo.OperatorID, "FormRolePermissionAdmin"));
     }
     catch (Exception myException)
     {
         BaseExceptionDao.Instance.LogException(myDbConnection, myOperatorInfo, myException);
         throw myException;
     }
     finally
     {
         myDbConnection.Close();
     }
     // 写入调试信息
     #if (DEBUG)
         BaseBusinessLogic.Instance.EndDebug(MethodBase.GetCurrentMethod(), milliStart);
     #endif
     return myDataTable;
 }
Example #2
0
 /// <summary>
 /// 批量保存角色
 /// </summary>
 /// <param name="myOperatorInfo">操作员信息</param>
 /// <param name="myDataTable">数据表</param>
 /// <param name="paramStaffID">职员代码</param>
 /// <returns>数据集</returns>
 public DataTable BatchSave(BaseOperatorInfo myOperatorInfo, DataTable myDataTable, string paramStaffID)
 {
     // 写入调试信息
     #if (DEBUG)
         int milliStart = BaseBusinessLogic.Instance.StartDebug(myOperatorInfo, MethodBase.GetCurrentMethod());
     #endif
     IBaseDbConnection myDbConnection = new OleDbHelper();
     try
     {
         myDbConnection.Open();
         BaseStaffRoleImpl myStaffRoleImpl = new BaseStaffRoleImpl(myDbConnection, myOperatorInfo);
         myStaffRoleImpl.BatchSave(myDataTable);
         myDataTable = myStaffRoleImpl.GetListByStaff(paramStaffID);
         // BUBaseOrganize myBUOrganize = new BUBaseOrganize(myDbConnection, myOperatorInfo);
         // myDataSet.Tables.Add(myBUOrganize.GetList());
         // myDataSet.Tables.Add(myBUStaffRole.GetListByStaff(paramStaffID));
         // myDataSet.EnforceConstraints = false;
         // myDataSet.Relations.Add("OrganizeRole", myDataSet.Tables[BaseOrganizeTable.TableName].Columns["ID"], myDataSet.Tables[BUBaseStaffRole.TableName].Columns["OrganizeID"]);
         // 添加相应的权限数据
         // myDataSet.Tables.Add(BasePermissionCheck.Instance.GetAuthorization(myDbConnection, myOperatorInfo.OperatorID, "FormStaffRoleAdmin"));
         BaseLogDao.Instance.Add(myDbConnection, myOperatorInfo);
     }
     catch (Exception myException)
     {
         BaseExceptionDao.Instance.LogException(myDbConnection, myOperatorInfo, myException);
         throw myException;
     }
     finally
     {
         myDbConnection.Close();
     }
     // 写入调试信息
     #if (DEBUG)
         BaseBusinessLogic.Instance.EndDebug(MethodBase.GetCurrentMethod(), milliStart);
     #endif
     return myDataTable;
 }
 /// <summary>
 /// 窗体加载
 /// </summary>
 /// <param name="myOperatorInfo">操作员信息</param>
 /// <param name="paramRoleID">角色代码</param>
 /// <returns>数据集</returns>
 public DataSet GetList(BaseOperatorInfo myOperatorInfo, string paramRoleID)
 {
     // 写入调试信息
     #if (DEBUG)
         int milliStart = BaseBusinessLogic.Instance.StartDebug(myOperatorInfo, MethodBase.GetCurrentMethod());
     #endif
     DataSet myDataSet = new DataSet();
     IBaseDbConnection myDbConnection = new OleDbHelper();
     try
     {
         myDbConnection.Open();
         BaseLogDao.Instance.Add(myDbConnection, myOperatorInfo);
         BaseModuleDao myBUModule = new BaseModuleDao(myDbConnection, myOperatorInfo);
         BaseRolePermissionImpl myBaseRolePermissionImpl = new BaseRolePermissionImpl(myDbConnection, myOperatorInfo);
         myDataSet.Tables.Add(myBUModule.GetListByCategory(myOperatorInfo.RootMenuID));
         //BUBaseBusinessLogic.Instance.SetFilter(myDataSet, BUModule.TableName, BUModule.Field_Enabled, "1");
         myDataSet.Tables.Add(myBaseRolePermissionImpl.GetListByRole(paramRoleID));
         myDataSet.EnforceConstraints = false;
         myDataSet.Relations.Add("RolePermission", myDataSet.Tables[BaseModuleTable.TableName].Columns[BaseModuleTable.Field_ID], myDataSet.Tables[BaseRoleModulePermissionTable.TableName].Columns[BaseStaffModulePermissionTable.Field_ModuleID]);
         // 添加相应的权限数据
         myDataSet.Tables.Add(BasePermissionCheck.Instance.GetAuthorization(myDbConnection, myOperatorInfo.OperatorID, "FormRolePermissionAdmin"));
     }
     catch (Exception myException)
     {
         BaseExceptionDao.Instance.LogException(myDbConnection, myOperatorInfo, myException);
         throw myException;
     }
     finally
     {
         myDbConnection.Close();
     }
     // 写入调试信息
     #if (DEBUG)
         BaseBusinessLogic.Instance.EndDebug(MethodBase.GetCurrentMethod(), milliStart);
     #endif
     return myDataSet;
 }
Example #4
0
 /// <summary>
 /// 窗体加载
 /// </summary>
 /// <param name="myOperatorInfo">操作员信息</param>
 /// <param name="paramStaffID">职员代码</param>
 /// <returns>数据集</returns>
 public DataSet GetList(BaseOperatorInfo myOperatorInfo, string paramStaffID)
 {
     // 写入调试信息
     #if (DEBUG)
         int milliStart = BaseBusinessLogic.Instance.StartDebug(myOperatorInfo, MethodBase.GetCurrentMethod());
     #endif
     DataSet myDataSet = new DataSet();
     IBaseDbConnection myDbConnection = new OleDbHelper();
     try
     {
         myDbConnection.Open();
         BaseOrganizeDao myBUOrganize = new BaseOrganizeDao(myDbConnection, myOperatorInfo);
         // myDataSet.Tables.Add(myBUOrganize.GetList());
         BaseStaffRoleImpl myStaffRoleImpl = new BaseStaffRoleImpl(myDbConnection, myOperatorInfo);
         myDataSet.Tables.Add(myStaffRoleImpl.GetListByStaff(paramStaffID));
         myDataSet.EnforceConstraints = false;
         // 添加相应的权限数据
         myDataSet.Tables.Add(BasePermissionCheck.Instance.GetAuthorization(myDbConnection, myOperatorInfo.OperatorID, "FormStaffRoleAdmin"));
         BaseLogDao.Instance.Add(myDbConnection, myOperatorInfo);
     }
     catch (Exception myException)
     {
         BaseExceptionDao.Instance.LogException(myDbConnection, myOperatorInfo, myException);
         throw myException;
     }
     finally
     {
         myDbConnection.Close();
     }
     // 写入调试信息
     #if (DEBUG)
         BaseBusinessLogic.Instance.EndDebug(MethodBase.GetCurrentMethod(), milliStart);
     #endif
     return myDataSet;
 }