Ejemplo n.º 1
0
        public string submitsignal(string json1)
        {
            try
            {
                JObject         item     = (JObject)JsonConvert.DeserializeObject(json1);
                PersonManagment pm       = new PersonManagment();
                string          workflow = item["WorkFlow"].ToString();
                string[]        member   = item["Member"].ToString().Split(new char[] { ',' });
                for (int i = 0; i < member.Length; i++)
                {
                    int  pid = pm.GetPersonId(member[i]);
                    int  mid = pm.GetMenuId(workflow);
                    bool res = pm.AddPW(pid, mid);
                }

                //bool ress = pm.AddPW(Convert.ToInt32(item["personid"].ToString()), Convert.ToInt32(item["menuid"].ToString()));
            }
            catch (Exception e)
            {
                return("");
            }
            return("/PersonAndWorkflows/Index");
        }