Naming fixes
This commit is contained in:
@ -6,26 +6,26 @@
|
||||
<table class="table table-borderless">
|
||||
<tr>
|
||||
<td>
|
||||
<label for="Name" class="control-label">Name: </label>
|
||||
<label class="control-label">Name: </label>
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control" @bind="@name" />
|
||||
<input class="form-control" @bind="@_name" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="Name" class="control-label">Type: </label>
|
||||
<label class="control-label">Type: </label>
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control" @bind="@jobtype" />
|
||||
<input class="form-control" @bind="@_jobType" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="Name" class="control-label">Enabled? </label>
|
||||
<label class="control-label">Enabled? </label>
|
||||
</td>
|
||||
<td>
|
||||
<select class="form-control" @bind="@isenabled">
|
||||
<select class="form-control" @bind="@_isEnabled">
|
||||
<option value="True">Yes</option>
|
||||
<option value="False">No</option>
|
||||
</select>
|
||||
@ -33,11 +33,11 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="Name" class="control-label">Runs Every: </label>
|
||||
<label class="control-label">Runs Every: </label>
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control" @bind="@interval" />
|
||||
<select class="form-control" @bind="@frequency">
|
||||
<input class="form-control" @bind="@_interval" />
|
||||
<select class="form-control" @bind="@_frequency">
|
||||
<option value="m">Minute(s)</option>
|
||||
<option value="H">Hour(s)</option>
|
||||
<option value="d">Day(s)</option>
|
||||
@ -47,26 +47,26 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="Name" class="control-label">Starting: </label>
|
||||
<label class="control-label">Starting: </label>
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control" @bind="@startdate" />
|
||||
<input class="form-control" @bind="@_startDate" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="Name" class="control-label">Ending: </label>
|
||||
<label class="control-label">Ending: </label>
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control" @bind="@enddate" />
|
||||
<input class="form-control" @bind="@_endDate" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="Name" class="control-label">Retention Log (Items): </label>
|
||||
<label class="control-label">Retention Log (Items): </label>
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control" @bind="@retentionhistory" />
|
||||
<input class="form-control" @bind="@_retentionHistory" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -76,42 +76,42 @@
|
||||
@code {
|
||||
public override SecurityAccessLevel SecurityAccessLevel { get { return SecurityAccessLevel.Host; } }
|
||||
|
||||
string name = "";
|
||||
string jobtype = "";
|
||||
string isenabled = "True";
|
||||
string interval = "";
|
||||
string frequency = "";
|
||||
string startdate = "";
|
||||
string enddate = "";
|
||||
string retentionhistory = "10";
|
||||
string _name = "";
|
||||
string _jobType = "";
|
||||
string _isEnabled = "True";
|
||||
string _interval = "";
|
||||
string _frequency = "";
|
||||
string _startDate = "";
|
||||
string _endDate = "";
|
||||
string _retentionHistory = "10";
|
||||
|
||||
private async Task SaveJob()
|
||||
{
|
||||
if (name != "" && !string.IsNullOrEmpty(jobtype) && frequency != "" && interval != "" && retentionhistory != "")
|
||||
if (_name != "" && !string.IsNullOrEmpty(_jobType) && _frequency != "" && _interval != "" && _retentionHistory != "")
|
||||
{
|
||||
Job job = new Job();
|
||||
job.Name = name;
|
||||
job.JobType = jobtype;
|
||||
job.IsEnabled = Boolean.Parse(isenabled);
|
||||
job.Frequency = frequency;
|
||||
job.Interval = int.Parse(interval);
|
||||
if (startdate == "")
|
||||
job.Name = _name;
|
||||
job.JobType = _jobType;
|
||||
job.IsEnabled = Boolean.Parse(_isEnabled);
|
||||
job.Frequency = _frequency;
|
||||
job.Interval = int.Parse(_interval);
|
||||
if (_startDate == "")
|
||||
{
|
||||
job.StartDate = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
job.StartDate = DateTime.Parse(startdate);
|
||||
job.StartDate = DateTime.Parse(_startDate);
|
||||
}
|
||||
if (enddate == "")
|
||||
if (_endDate == "")
|
||||
{
|
||||
job.EndDate = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
job.EndDate = DateTime.Parse(enddate);
|
||||
job.EndDate = DateTime.Parse(_endDate);
|
||||
}
|
||||
job.RetentionHistory = int.Parse(retentionhistory);
|
||||
job.RetentionHistory = int.Parse(_retentionHistory);
|
||||
job.IsStarted = false;
|
||||
job.IsExecuting = false;
|
||||
job.NextExecution = null;
|
||||
|
Reference in New Issue
Block a user