/// <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);
        }
示例#2
0
 public bool Delete(rel_rolemenus p)
 {
     return(_repository.Delete(p));
 }
示例#3
0
 /// <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));
 }
示例#4
0
 public bool Update(rel_rolemenus p)
 {
     return(_repository.Update(p));
 }
示例#5
0
 public bool Insert(rel_rolemenus p)
 {
     return(_repository.Insert(p));
 }