예제 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            EmpVoiceAskQuestion ent = null;

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

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

        #endregion

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

            EmpVoiceAskQuestion ent = null;

            switch (this.RequestAction)
            {
            case RequestActionEnum.Update:
                ent = this.GetMergedData <EmpVoiceAskQuestion>();
                ent.DoUpdate();
                this.PageState.Add("Ent", ent);
                break;

            case RequestActionEnum.Insert:
            case RequestActionEnum.Create:
                string Anonymity = this.RequestData.Get("Anonymity") + "";
                ent           = this.GetPostedData <EmpVoiceAskQuestion>();
                ent.Anonymity = Anonymity;     //1 表示匿名
                ent.DoCreate();

                break;

            case RequestActionEnum.Delete:
                ent = this.GetTargetData <EmpVoiceAskQuestion>();
                ent.DoDelete();

                return;

            default:
                Doselect();
                break;
            }
        }