예제 #1
0
        private void DoSelect()
        {
            ////获取系统枚举流程
            //string WFSQL = "select Code,TemplateName from  FL_Culture_AimPortal..WorkflowTemplate";
            //this.PageState.Add("WFEnum", DataHelper.QueryDict(WFSQL));
            //this.PageState.Add("PostionType", SysEnumeration.GetEnumDict("PostionType"));

            string SQL = @" select top 20 MName,MName As Name from  FL_Culture..ManagementGroup order by SortIndex Desc ";

            this.PageState.Add("PostionType", DataHelper.QueryDict(SQL));

            string AccessPower = "", SurveyedPower = "";

            if (!String.IsNullOrEmpty(id))
            {
                ent           = Model.SurveyType.Find(id);
                SurveyedPower = ent.SurveyedPower;
                AccessPower   = ent.AccessPower;
                this.PageState.Add("AccessList", ent.AccessPower);
            }
            else
            {
                //创建情况
                ent          = new Model.SurveyType();
                ent.TypeCode = "HR_ST" + DateTime.Now.ToString("yyyyMMddhhmm");
            }
            this.SetFormData(ent);
        }
예제 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            op   = RequestData.Get <string>("op");
            id   = RequestData.Get <string>("id");
            type = RequestData.Get <string>("type");

            switch (this.RequestAction)
            {
            case RequestActionEnum.Update:
                DoUpdate();
                break;

            case RequestActionEnum.Insert:
            case RequestActionEnum.Create:
                DoCreate();
                break;

            case RequestActionEnum.Delete:
                ent = GetTargetData <Model.SurveyType>();
                ent.DoDelete();
                return;

            default:
                DoSelect();
                break;
            }
        }
예제 #3
0
 private void DoStopType()
 {
     if (!string.IsNullOrEmpty(id))
     {
         Model.SurveyType ent = Model.SurveyType.Find(id);
         ent.EnabledState = "0";
         ent.DoUpdate();
         this.PageState.Add("State", "Secuss");
     }
 }
예제 #4
0
        private void DoUpdate()
        {
            string AccessPower   = RequestData.Get("AccessPower") + "";
            string MustCheckFlow = RequestData.Get("MustCheckFlow") + "";

            ent               = this.GetMergedData <Model.SurveyType>();
            ent.AccessPower   = AccessPower;
            ent.MustCheckFlow = MustCheckFlow;
            ent.DoUpdate();
        }
예제 #5
0
        private void DoCreate()
        {
            string AccessPower   = RequestData.Get("AccessPower") + "";
            string MustCheckFlow = RequestData.Get("MustCheckFlow") + "";

            ent               = GetPostedData <Model.SurveyType>();
            ent.AccessPower   = AccessPower;
            ent.EnabledState  = "1";  //启用标志
            ent.MustCheckFlow = MustCheckFlow;
            ent.DoCreate();
        }
예제 #6
0
        string id = string.Empty;  //数据ID
        protected void Page_Load(object sender, EventArgs e)
        {
            id = RequestData.Get("id") + "";
            Model.SurveyType ent = null;
            switch (this.RequestAction)
            {
            case RequestActionEnum.Delete:
                ent = this.GetTargetData <Model.SurveyType>();
                ent.DoDelete();
                this.SetMessage("删除成功!");
                break;

            default:
                if (RequestActionString == "batchdelete")
                {
                    DoBatchDelete();
                }
                else if (RequestActionString == "StartType")
                {
                    DoStartType();
                }
                else if (RequestActionString == "StopType")
                {
                    DoStopType();
                }
                else if (RequestActionString == "IsRef")
                {
                    CheckRef();
                }
                else
                {
                    DoSelect();
                }
                break;
            }
        }