コード例 #1
0
        public ActionResult UpdateGroup(string id, string strObject)
        {
            try
            {
                // TODO: Add update logic here
                string[] arrComm = strObject.Split(new string[] { "," }, System.StringSplitOptions.None);
                DataSet  ds      = new DataSet();
                int      Group   = GroupID;
                string   rule    = arrComm[0].ToString();
                string   read    = arrComm[1].ToString();
                string   write   = arrComm[2].ToString();
                string   create  = arrComm[3].ToString();
                string   delete  = arrComm[4].ToString();

                ds = data.CreateAccessRight(Group, rule, read, write, create, delete);

                ViewBag.Mess = ds.Tables[0].Rows[0]["sMess"].ToString();
                if (ds.Tables[0].Rows[0]["iCode"].ToString() == "1")
                {
                    Session[CConfig.SESSION_RIGHT_PERMISSION] = null;
                }
                return(RedirectToAction("Edit", "Group", new { id = GroupID }));
            }
            catch (Exception ex)

            {
                var exs = ex;
                return(View());
            }
        }