Ejemplo n.º 1
0
        private void Initialize()
        {
            WebUtility.RequiredScript(typeof(ControlBaseScript));
            this.JobID = WebUtility.GetRequestQueryValue("jobId", string.Empty);
            if (string.IsNullOrEmpty(this.JobID))
            {
                this.JobID = Guid.NewGuid().ToString();
                this.Mode  = PageMode.Create;
            }
            else
            {
                this.Mode = PageMode.Edit;
            }

            if (!IsPostBack)
            {
                var jobTypeDesc = EnumItemDescriptionAttribute.GetDescriptionList(typeof(JobType));

                this.ddlType.DataTextField  = "Description";
                this.ddlType.DataValueField = "EnumValue";
                this.ddlType.DataSource     = jobTypeDesc;
                this.ddlType.DataBind();

                this.ddlProcess.DataSource = WfProcessDescHelper.GetAllProcessDescKeys(true);
                this.ddlProcess.DataBind();

                if (this.Mode == PageMode.Create)
                {
                    detailGrid.InitialData = new List <SimpleSchedule>();
                }
                else
                {
                    InitControlState();
                }
            }
        }