/// <summary> /// 给模块分配操作码 /// </summary> /// <param name="moduleId"></param> /// <param name="operaIds"></param> /// <returns></returns> public void UpdateModuleOperationByModuleId(int moduleId, string[] operaIds) { using (DBContainer db = new DBContainer()) { db.P_Sys_DeleteModuleOperation(moduleId); foreach (var operaId in operaIds) { if (!String.IsNullOrWhiteSpace(operaId)) { db.P_Sys_SysModuleAllotOperation(Convert.ToInt32(operaId), moduleId); } } db.SaveChanges(); } }