예제 #1
0
        public ActionResult WinUserMore_UserAuthorNowRead(string ParentVariable, string sNowUserID)
        {
            UserInfoManage  userMan = new UserInfoManage();
            Paging <object> obj     = userMan.GetNowAuthorStore(sNowUserID);

            return(this.Store(obj));
        }
예제 #2
0
        public override ActionResult WindowCommonShow(string PanelID, string ParentVariable, string ParentKey)
        {
            setParentVariable("UserControl", "WinUserMore", "WinUserMore_SelectDepartmentChange", null, "DepartmentInfo");
            SetHiddenValue(PanelID + "_cmbDepartmentInfo_ParentVariable", ParentVar.DefaultVal);

            setParentVariable("UserControl", "WinUserMore", "WinUserMore_SelectDutyChange", null, "DutyInfo");
            SetHiddenValue(PanelID + "_cmbDutyInfo_ParentVariable", ParentVar.DefaultVal);

            UserInfoManage userMan = new UserInfoManage();

            GetParentVariable(ParentVariable);
            //如果userId中包含Row,说明是从DataList传来的selection
            //否则就应该只是userinfo的一个主键值
            string sUserID = ParentVar.transValue;

            if (ParentVar.transValue.Contains("Row"))
            {
                UserInfoDataListManage userDataListMan = new UserInfoDataListManage();
                userDataListMan.InitSelection(ParentVar.transValue);
                sUserID = userDataListMan.sRowNowID;
            }
            tblUserInfo model = userMan.GetOneUserModel(sUserID);

            //如果是新增,model.ID=0,那么获取传过来的departmentId和DutyId
            if (model.ID == 0)
            {
                string[] ss = ParentKey.Split(CosValue.SPLITOPERATOR1);
                model.UserIDepartmentIID = Convert.ToInt64(ss[0]);
                if (ss.Length > 1)
                {
                    model.UserIDutyIID = Convert.ToInt64(ss[1]);
                }
                else
                {
                    model.UserIDutyIID = 0;
                }
            }
            var form = this.GetCmp <FormPanel>(PanelID + "_Form");

            form.SetValues(model);

            SetHiddenValue(PanelID + "_ExitCode", "0");

            var store = this.GetCmp <Store>(PanelID + "_AllRoleStore");

            store.LoadProxy();
            store = this.GetCmp <Store>(PanelID + "_NowRoleStore");
            store.LoadProxy();

            SetThreeListComboValue(PanelID + "_cmbDepartmentInfo", model.UserIDepartmentIID.ToString());

            if ((model.UserIDutyIID == 0) || (model.UserIDutyIID == null))
            {
                SetComboValue(PanelID + "_cmbDutyInfo", "-1", true);
            }
            else
            {
                SetComboValue(PanelID + "_cmbDutyInfo", model.UserIDutyIID.ToString(), true);
            }

            Paging <object> obj = userMan.GetNowAuthorStore(sUserID);

            SetHiddenValue(PanelID + "_OriginAuthorIDs", string.Join(CosValue.SPLITOPERATOR2.ToString(), userMan.NowAuthorIDs.ToArray()));

            return(this.Direct());
        }