Beispiel #1
0
    protected void FindValue()
    {
        //string checkValue;
        //string[] KeyIdChecks;

        if (this.KeyId != string.Empty)
        {
            lblTeskName.Text = SchedulerObj.TaskName.Substring(0, SchedulerObj.TaskName.LastIndexOf("-"));//截取-CreateSD
            if (SchedulerObj.ScheduleType != null)
            {
                rcbScheduleType.Text = SchedulerObj.ScheduleType.Trim();
            }
            if (SchedulerObj.StartTime.ToString() != null)
            {
                rdtimepStartTime.Text = Convert.ToDateTime(SchedulerObj.StartTime).ToString("MM/dd/yyyy h:mm tt");
            }

            //KeyIdChecks = SchedulerObj.RunOnly.Split('#');
            //if (KeyIdChecks != null)
            //{
            //    for (int i = 0; i < KeyIdChecks.Length; i++)
            //    {
            //        checkValue = KeyIdChecks[i].ToString();
            //        for (int j = 0; j < ckxlROOTD.Items.Count; j++)
            //        {
            //            if (ckxlROOTD.Items[j].Value == checkValue)
            //            {
            //                ckxlROOTD.Items[j].Selected = true;
            //            }
            //        }
            //    }
            //}


            if (SchedulerObj.RunOnlyEnd.ToString() != string.Empty)
            {
                RadTimePicker2.Text = Convert.ToDateTime(SchedulerObj.RunOnlyEnd).ToString("MM/dd/yyyy h:mm tt");
            }
            if (SchedulerObj.Action != null)
            {
                rcbAction.Text = SchedulerObj.Action.Trim();
            }
            if (SchedulerObj.PostAction != null)
            {
                rcbPostAction.Text = SchedulerObj.PostAction.Trim();
            }

            if (SchedulerObj.BackupID.ToString() != string.Empty)
            {
                BLL_Backup      = new BackupBLL();
                chkBDBB.Checked = BLL_Backup.ExistFindBackupById(SchedulerObj.BackupID.ToString());//查看是否有数据备份设置
            }
        }
    }
    protected void FindValue()
    {
        //string checkValue;
        //string[] KeyIdChecks;

        if (this.KeyId != string.Empty)
        {
            rtxtTaskName.Text = SchedulerObj.TaskName.Substring(0, SchedulerObj.TaskName.LastIndexOf("-"));//截取-CreateSD;
            if (SchedulerObj.ScheduleType != null)
            {
                rcbScheduleType.SelectedIndex = rcbScheduleType.Items.IndexOf(rcbScheduleType.Items.FindItemByValue(SchedulerObj.ScheduleType.Trim()));
                //if (!SchedulerObj.ScheduleType.Equals("Weekly"))
                //{
                //    ckxlROOTD.Enabled = false;
                //}
                //else
                //{
                //    ckxlROOTD.Enabled = true;
                //}
            }
            //if (SchedulerObj.StartTime.ToString() != null)
            //{
            //    rdtimepStartTime.SelectedDate = SchedulerObj.StartTime;
            //}

            //KeyIdChecks = SchedulerObj.RunOnly.Split('#');
            //if (KeyIdChecks != null)
            //{
            //    for (int i = 0; i < KeyIdChecks.Length; i++)
            //    {
            //        checkValue = KeyIdChecks[i].ToString();
            //        for (int j = 0; j < ckxlROOTD.Items.Count; j++)
            //        {
            //            if (ckxlROOTD.Items[j].Value == checkValue)
            //            {
            //                ckxlROOTD.Items[j].Selected = true;
            //            }
            //        }
            //    }
            //}

            if (SchedulerObj.RunOnlyStart.ToString() != string.Empty)
            {
                rdStartTime.SelectedDate = SchedulerObj.RunOnlyStart;
            }
            if (SchedulerObj.RunOnlyEnd.ToString() != string.Empty)
            {
                rdEndTime.SelectedDate = SchedulerObj.RunOnlyEnd;
            }
            if (SchedulerObj.Action != null)
            {
                rcbAction.SelectedIndex = rcbAction.Items.IndexOf(rcbAction.Items.FindItemByValue(SchedulerObj.Action.Trim()));
            }
            if (SchedulerObj.PostAction != null)
            {
                rcbPostAction.SelectedIndex = rcbPostAction.Items.IndexOf(rcbPostAction.Items.FindItemByValue(SchedulerObj.PostAction.Trim()));
            }

            if (SchedulerObj.BackupID.ToString() != string.Empty)
            {
                BLL_Backup      = new BackupBLL();
                chkBDBB.Checked = BLL_Backup.ExistFindBackupById(SchedulerObj.BackupID.ToString());//查看是否有数据备份设置
            }
            else
            {
                chkBDBB.Checked = false;
                //编辑新增加了Backup信息
                HttpCookie BuckupSettingData = Request.Cookies.Get("BuckupSetting");
                if (BuckupSettingData != null)
                {
                    if (BuckupSettingData.Values["BackupId"] != string.Empty)
                    {
                        chkBDBB.Checked = true;
                    }
                }
            }
        }
    }