コード例 #1
0
        public void Update(string txt_action_type, int role_id)
        {
            //添角色户权限
            var navs = txt_action_type.Split(new char[] { ';' });

            foreach (var nav in navs)
            {
                var role_value = nav.Split(new char[] { ':' });
                if (role_value.Length > 1)
                {
                    List <SearchTemplate> st = new List <SearchTemplate>()
                    {
                        new SearchTemplate()
                        {
                            key = "role_id", value = role_id, searchType = Common.EnumBase.SearchType.Eq
                        },
                        new SearchTemplate()
                        {
                            key = "nav_id", value = Convert.ToInt32(role_value[0]), searchType = Common.EnumBase.SearchType.Eq
                        }
                    };
                    var list = GetList(st, null);
                    Domain.Manager_role_value m_mrv = new Domain.Manager_role_value();
                    if (list.Count > 0)
                    {
                        m_mrv             = list[0];
                        m_mrv.action_type = role_value[1];
                    }
                    else
                    {
                        m_mrv.action_type = role_value[1];
                        m_mrv.nav_id      = Convert.ToInt32(role_value[0]);
                        m_mrv.role_id     = role_id;
                    }
                    Update(m_mrv);
                }
            }
        }
コード例 #2
0
 public void Update(Domain.Manager_role_value model)
 {
     dal.Update(model);
 }