示例#1
0
        /// <summary>
        /// 保存
        /// </summary>
        private void DoSave()
        {
            string Id        = RequestData.Get("Id") + "";
            string SortIndex = RequestData.Get("SortIndex") + "";
            string MName     = RequestData.Get("MName") + "";

            if (string.IsNullOrEmpty(Id))
            {
                ManagementGroup Mg = new ManagementGroup();
                Mg.CreateId   = UserInfo.UserID;
                Mg.CreateTime = DateTime.Now;
                Mg.CreateName = UserInfo.LoginName;

                Mg.SortIndex = int.Parse(SortIndex);
                Mg.MName     = MName;
                Mg.DoCreate();
                this.PageState.Add("Id", Mg.Id);
            }
            else
            {
                ManagementGroup Mg = ManagementGroup.Find(Id);
                Mg.SortIndex = int.Parse(SortIndex);
                Mg.MName     = MName;

                Mg.CreateId   = UserInfo.UserID;
                Mg.CreateTime = DateTime.Now;
                Mg.CreateName = UserInfo.LoginName;
                Mg.DoUpdate();
            }
        }
示例#2
0
        private void DoUpdate()
        {
            string OrgEns = RequestData.Get("OrgEnts") + "";

            ent = this.GetMergedData <ManagementGroup>();
            if (!string.IsNullOrEmpty(OrgEns))
            {
                ent.GroupsSet = OrgEns;
            }
            ent.DoUpdate();
        }