Refactoring (#314)
* Refactoring * Refactoring * Check for a valid email. * Fixed missing character. * Moved logic to the Utilities class. * Rename template .sql file * Modified null and empty string check. * Check for a valid email. * Fixed missing character. * Moved logic to the Utilities class. * Added Favicon support, Progressive Web App support, page title and url support, and private/public user registration options * Refactoring * Refactoring * Check for a valid email. * Moved logic to the Utilities class. Co-authored-by: Aubrey <aubrey.b@treskcow.tech> Co-authored-by: MIchael Atwood <matwood@dragonmastery.com> Co-authored-by: Shaun Walker <shaun.walker@siliqon.com>
This commit is contained in:
@ -74,28 +74,29 @@
|
||||
<NavLink class="btn btn-secondary" href="@NavigateUrl()">Cancel</NavLink>
|
||||
|
||||
@code {
|
||||
public override SecurityAccessLevel SecurityAccessLevel { get { return SecurityAccessLevel.Host; } }
|
||||
private string _name = string.Empty;
|
||||
private string _jobType = string.Empty;
|
||||
private string _isEnabled = "True";
|
||||
private string _interval = string.Empty;
|
||||
private string _frequency = string.Empty;
|
||||
private string _startDate = string.Empty;
|
||||
private string _endDate = string.Empty;
|
||||
private string _retentionHistory = "10";
|
||||
|
||||
string _name = "";
|
||||
string _jobType = "";
|
||||
string _isEnabled = "True";
|
||||
string _interval = "";
|
||||
string _frequency = "";
|
||||
string _startDate = "";
|
||||
string _endDate = "";
|
||||
string _retentionHistory = "10";
|
||||
public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.Host;
|
||||
|
||||
private async Task SaveJob()
|
||||
{
|
||||
if (_name != "" && !string.IsNullOrEmpty(_jobType) && _frequency != "" && _interval != "" && _retentionHistory != "")
|
||||
if (_name != string.Empty && !string.IsNullOrEmpty(_jobType) && _frequency != string.Empty && _interval != string.Empty && _retentionHistory != string.Empty)
|
||||
{
|
||||
Job job = new Job();
|
||||
var job = new Job();
|
||||
job.Name = _name;
|
||||
job.JobType = _jobType;
|
||||
job.IsEnabled = Boolean.Parse(_isEnabled);
|
||||
job.Frequency = _frequency;
|
||||
job.Interval = int.Parse(_interval);
|
||||
if (_startDate == "")
|
||||
|
||||
if (_startDate == string.Empty)
|
||||
{
|
||||
job.StartDate = null;
|
||||
}
|
||||
@ -103,7 +104,8 @@
|
||||
{
|
||||
job.StartDate = DateTime.Parse(_startDate);
|
||||
}
|
||||
if (_endDate == "")
|
||||
|
||||
if (_endDate == string.Empty)
|
||||
{
|
||||
job.EndDate = null;
|
||||
}
|
||||
@ -111,6 +113,7 @@
|
||||
{
|
||||
job.EndDate = DateTime.Parse(_endDate);
|
||||
}
|
||||
|
||||
job.RetentionHistory = int.Parse(_retentionHistory);
|
||||
job.IsStarted = false;
|
||||
job.IsExecuting = false;
|
||||
|
Reference in New Issue
Block a user