/// <summary> /// 增加一条数据 /// </summary> public bool Add(int userId, int[] rightsID, Eastcom.Model.v_Sys_User_Info uModel) { bool flag = true; Eastcom.Model.Sys_Power_UserRight userRightModel = null; if (rightsID.Length > 0) { if (this.DelWhere(string.Format("FK_UserID={0}", userId))) { for (int i = 0; i < rightsID.Length; i++) { if (rightsID[i] > 0) { userRightModel = new Eastcom.Model.Sys_Power_UserRight(); userRightModel.EditTime = DateTime.Now; userRightModel.FK_EditID = uModel.UserID; userRightModel.FK_RightID = rightsID[i]; userRightModel.FK_UserID = userId; if (this.Add(userRightModel) <= 0) { flag = false; } } } } } return(flag); }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(Eastcom.Model.Sys_Power_UserRight model) { return(dal.Update(model)); }
/// <summary> /// 增加一条数据 /// </summary> public int Add(Eastcom.Model.Sys_Power_UserRight model) { return(dal.Add(model)); }