Exemplo n.º 1
0
        public ActionResult Index()
        {
            Member _member = new Member("users");

            Hashtable empty = new Hashtable();
            empty["id"] = "0";
            empty["name"] = string.Empty;

            string internal_userGroup_name = UserGroup.Internal;
            int internal_id = int.Parse((from o in this._db.recsys_option
                                         where o.type_code == "UG" && o.active == true && o.name == internal_userGroup_name
                                         select o.value).FirstOrDefault());

            ArrayList supervisorArray = new ArrayList();
            supervisorArray.Add(empty);
            supervisorArray.AddRange(_member.getAll("type = '3' AND [user_group] = '" + internal_id + "' AND status = '1'", "name ASC"));
            ViewBag.supervisor = Common.array_conv(supervisorArray, "id", "name");
            ViewBag.engineer = Common.array_conv(_member.getAll("type = '4' AND status = '1'", "name ASC"), "id", "name");
            ViewBag.status = this._status;
            return View();
        }