public int SetMenu2Auth() { string auth_id = Request["auth_id"].ToString(); string menuoption = Request["menuids"].ToString(); menuoption = menuoption.Remove(menuoption.Length - 1, 1); string[] arrop = menuoption.Split(','); var b = new AutekInfo.BLL.M_Menu_Auth(); var list = new List<AutekInfo.Model.M_Menu_Auth>(); foreach (string op in arrop) { var m=new AutekInfo.Model.M_Menu_Auth(); m.auth_id=int.Parse(auth_id); m.menu_options=op; list.Add(m); } return b.AddModelList(list); }
public string GetMenu2Auth() { string auth_id = Request["id"]; var b = new AutekInfo.BLL.M_Menu_Auth(); var list =b.GetModelList(" auth_id="+auth_id); return JsonConvert.SerializeObject(list); }