protected void btnSave_Click(object sender, EventArgs e)
    {
        var original_scheduledTask = new InfoControl.Web.ScheduledTasks.ScheduledTask();

        schedulerManager = new SchedulerManager(this);
        scheduledTask = new InfoControl.Web.ScheduledTasks.ScheduledTask();

        if (scheduledTaskId > 0)
        {
            original_scheduledTask = schedulerManager.GetScheduleTask(scheduledTaskId);
            scheduledTask = original_scheduledTask.Duplicate();
        }

        scheduledTask.Name = txtName.Text;
        scheduledTask.Period = ucCurrFieldTxtPeriod.IntValue;
        scheduledTask.Enabled = chkEnabled.Checked;
        scheduledTask.TypeFullName = txtTypeFullName.Text;

        if (ucPeriodDate.DateTime != null)
            scheduledTask.StartTime = Convert.ToDateTime(ucPeriodDate.DateTime);
        
        schedulerManager.SaveScheduleTask(scheduledTask);

        Server.Transfer("ScheduleTasks.aspx");
    }
Ejemplo n.º 2
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        var original_scheduledTask = new InfoControl.Web.ScheduledTasks.ScheduledTask();

        schedulerManager = new SchedulerManager(this);
        scheduledTask    = new InfoControl.Web.ScheduledTasks.ScheduledTask();

        if (scheduledTaskId > 0)
        {
            original_scheduledTask = schedulerManager.GetScheduleTask(scheduledTaskId);
            scheduledTask          = original_scheduledTask.Duplicate();
        }

        scheduledTask.Name         = txtName.Text;
        scheduledTask.Period       = ucCurrFieldTxtPeriod.IntValue;
        scheduledTask.Enabled      = chkEnabled.Checked;
        scheduledTask.TypeFullName = txtTypeFullName.Text;

        if (ucPeriodDate.DateTime != null)
        {
            scheduledTask.StartTime = Convert.ToDateTime(ucPeriodDate.DateTime);
        }

        schedulerManager.SaveScheduleTask(scheduledTask);

        Server.Transfer("ScheduleTasks.aspx");
    }
Ejemplo n.º 3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!String.IsNullOrEmpty(Request["ScheduledTaskId"]))
        {
            scheduledTaskId = Convert.ToInt32(Request["ScheduledTaskId"]);
        }

        //txtLastRunStatus.Enabled = false;

        if (!IsPostBack)
        {
            if (scheduledTaskId > 0)
            {
                schedulerManager = new SchedulerManager(this);
                scheduledTask    = schedulerManager.GetScheduleTask(scheduledTaskId);

                txtName.Text          = scheduledTask.Name;
                ucPeriodDate.DateTime = scheduledTask.StartTime;
                ucCurrFieldTxtPeriod.CurrencyValue = scheduledTask.Period;
                chkEnabled.Checked     = scheduledTask.Enabled;
                txtTypeFullName.Text   = scheduledTask.TypeFullName;
                txtLastRunStatus.Value = scheduledTask.LastRunStatus;
            }
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!String.IsNullOrEmpty(Request["ScheduledTaskId"]))
            scheduledTaskId = Convert.ToInt32(Request["ScheduledTaskId"]);

        //txtLastRunStatus.Enabled = false;

        if (!IsPostBack)
        {
            if (scheduledTaskId > 0)
            {
                schedulerManager = new SchedulerManager(this);
                scheduledTask = schedulerManager.GetScheduleTask(scheduledTaskId);

                txtName.Text = scheduledTask.Name;
                ucPeriodDate.DateTime = scheduledTask.StartTime;
                ucCurrFieldTxtPeriod.CurrencyValue = scheduledTask.Period;
                chkEnabled.Checked = scheduledTask.Enabled;
                txtTypeFullName.Text = scheduledTask.TypeFullName;
                txtLastRunStatus.Value = scheduledTask.LastRunStatus;
            }
        }

    }
Ejemplo n.º 5
0
 partial void DeleteScheduledTask(ScheduledTask instance);
Ejemplo n.º 6
0
 partial void UpdateScheduledTask(ScheduledTask instance);
Ejemplo n.º 7
0
 partial void InsertScheduledTask(ScheduledTask instance);
Ejemplo n.º 8
0
 /// <summary>
 /// This method inserts a new record in the table.
 /// Change this method to alter how records are inserted.
 /// </summary>
 /// <param name=entity>entity</param>
 private void Insert(ScheduledTask entity)
 {
     //
     DbContext.ScheduledTasks.InsertOnSubmit(entity);
     DbContext.SubmitChanges();
 }
 partial void DeleteScheduledTask(ScheduledTask instance);
 partial void UpdateScheduledTask(ScheduledTask instance);
 partial void InsertScheduledTask(ScheduledTask instance);