public CompanyService(IClsCompany company, IClsRole role, IMySession mySession, IClsUser user) { _company = company; _role = role; _mySession = mySession; _user = user; }
public long SaveRole(IClsRole input) { try { long roleId = 0; using (TransactionScope scope = new TransactionScope()) { using (this.objDataContext = GetDataContext()) { var objSave = input as ClsRole; var result = this.objDataContext.InsertOrUpdateRole(objSave.lgId, objSave.strRoleName, objSave.strDescription, objSave.blAllowKilometerLimit, _mySession.UserId, PageMaster.Role, objSave.blAllowDispatchBackDateEntry).FirstOrDefault(); if (result != null) { roleId = result.InsertedId; foreach (var item in objSave.strRights.Split(',')) { string[] strRight = item.Split('|'); this.objDataContext.InsertOrUpdateRolePermissions(strRight[0].LongSafe(), roleId, strRight[1].LongSafe(), strRight[2].BoolSafe(), strRight[3].BoolSafe(), strRight[4].BoolSafe(), strRight[5].BoolSafe(), strRight[6].BoolSafe(), _mySession.UserId, PageMaster.Role); } } } objDataContext.SubmitChanges(); scope.Complete(); } return(roleId); } catch (Exception ex) { _logger.Write(ex, System.Reflection.MethodBase.GetCurrentMethod().Name, PageMaster.Role, _mySession.UserId); return(0); } }
/// <summary> Zero-based index of the cls role,company and user. </summary> /// public GroupController(IClsGroup objiClsGroup, IClsCompany objiClsCompany, IClsRole objIClsRole, IClsUser objiClsUser) { this.objiClsGroup = objiClsGroup; this.objiClsCompany = objiClsCompany; this.objiClsRole = objIClsRole; this.objiClsUser = objiClsUser; }
public CommonController(IClsUser objIClsUser, IClsRole objIClsRole, IClsFleetMakes objIClsFleetMakes, IClsFleetModels objIClsFleetModels, IClsFleetColors objIClsFleetColors, IClsTripReason objIClsTripReason, IClsTracker objIClsTracker) { this.objiClsUser = objIClsUser; this.objiClsRole = objIClsRole; this.objiClsFleetMakes = objIClsFleetMakes; this.objiClsFleetModels = objIClsFleetModels; this.objiClsFleetColors = objIClsFleetColors; this.objiClsTripReason = objIClsTripReason; this.objiClsTracker = objIClsTracker; }
public long SaveRole(IClsRole objRole) { return(_role.SaveRole(objRole)); }
public UserService(IClsUser user, IClsRole role) { _user = user; _role = role; }
/// <summary> Zero-based index of the cls role and company. </summary> public RoleController(IClsRole objIClsRole, IClsCompany objiClsCompany) { this.objiClsRole = objIClsRole; this.objiClsCompany = objiClsCompany; }
/// <summary> Zero-based index of the cls role,company and user. </summary> public CompanyController(IClsCompany objiClsCompany, IClsRole objIClsRole, IClsUser objiClsUser) { this.objiClsCompany = objiClsCompany; this.objiClsRole = objIClsRole; this.objiClsUser = objiClsUser; }
/// <summary> Zero-based index of the cls role and cls user. </summary> public UserController(IClsUser objIClsUser, IClsRole objIClsRole) { this.objiClsUser = objIClsUser; this.objiClsRole = objIClsRole; }