/// <summary> /// /// </summary> /// <param name="roleid"></param> /// <param name="menuids"></param> /// <returns></returns> public bool SaveRoleMenu(string roleid, string menuids) { List <rel_rolemenus> datas = null; bool flag = false; menuids = menuids.Remove(menuids.Length - 1, 1); string[] menuarr = menuids.Split(','); if (menuarr.Any()) { datas = new List <rel_rolemenus>(); for (int i = 0; i < menuarr.Count(); i++) { rel_rolemenus tmp = new rel_rolemenus() { roleid = roleid, menuid = menuarr[i], createdate = DateTime.Now }; datas.Add(tmp); } flag = SaveRoleMenu_Db(roleid, datas); } return(flag); }
public bool Delete(rel_rolemenus p) { return(_repository.Delete(p)); }
/// <summary> /// 修改指定的字段 /// </summary> /// <param name="entity"></param> /// <param name="fileds"></param> /// <returns></returns> public bool UpdateSubFields(rel_rolemenus entity, List <string> fileds) { return(_repository.UpdateSubFields(entity, fileds)); }
public bool Update(rel_rolemenus p) { return(_repository.Update(p)); }
public bool Insert(rel_rolemenus p) { return(_repository.Insert(p)); }