protected void Page_Load(object sender, EventArgs e)
        {
            SupervisionGuiHua ent = null;

            switch (this.RequestAction)
            {
            case RequestActionEnum.Delete:
                ent = this.GetTargetData <SupervisionGuiHua>();
                ent.DoDelete();
                this.SetMessage("删除成功!");
                break;

            default:
                if (RequestActionString == "batchdelete")
                {
                    DoBatchDelete();
                }
                else if (RequestActionString == "Revoke")
                {
                    Revoke();
                }
                else
                {
                    DoSelect();
                }
                break;
            }
        }
Example #2
0
        string type = String.Empty; // 对象类型

        #endregion

        #region ASP.NET 事件

        protected void Page_Load(object sender, EventArgs e)
        {
            op   = RequestData.Get <string>("op");
            id   = RequestData.Get <string>("id");
            type = RequestData.Get <string>("type");

            SupervisionGuiHua ent = null;

            switch (this.RequestAction)
            {
            case RequestActionEnum.Update:
                ent            = this.GetMergedData <SupervisionGuiHua>();
                ent.ModifyName = UserInfo.Name;
                ent.ModifyId   = UserInfo.UserID;
                ent.DoUpdate();
                this.SetMessage("修改成功!");
                break;

            case RequestActionEnum.Insert:
            case RequestActionEnum.Create:
                ent            = this.GetPostedData <SupervisionGuiHua>();
                ent.ModifyName = UserInfo.Name;
                ent.ModifyId   = UserInfo.UserID;
                ent.DoCreate();
                this.SetMessage("新建成功!");
                break;

            case RequestActionEnum.Delete:
                ent = this.GetTargetData <SupervisionGuiHua>();
                ent.DoDelete();
                this.SetMessage("删除成功!");
                return;
            }

            if (op != "c" && op != "cs")
            {
                if (!String.IsNullOrEmpty(id))
                {
                    ent = SupervisionGuiHua.Find(id);
                }

                this.SetFormData(ent);
            }
        }