qol: simplify accessors
This commit is contained in:
@@ -15,7 +15,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
[HttpPost]
|
||||
public virtual ActionResult TestCallback(CallbackModel model)
|
||||
{
|
||||
return this.PrecompiledPartialView<API.Views.Activation._ActivateCallback>(model);
|
||||
return this.PrecompiledPartialView<Views.Activation._ActivateCallback>(model);
|
||||
}
|
||||
|
||||
[HttpPost, ValidateAntiForgeryToken]
|
||||
|
||||
@@ -208,7 +208,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
|
||||
#region Actions
|
||||
|
||||
public virtual ActionResult Delete(int id, Nullable<bool> redirect = false)
|
||||
public virtual ActionResult Delete(int id, bool? redirect = false)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
@@ -513,7 +513,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
#region Actions
|
||||
|
||||
[DiscoAuthorize(Claims.Config.DeviceBatch.Delete)]
|
||||
public virtual ActionResult Delete(int id, Nullable<bool> redirect = false)
|
||||
public virtual ActionResult Delete(int id, bool? redirect = false)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
@@ -247,7 +247,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
ComputerNameTemplate = ComputerNameTemplate,
|
||||
};
|
||||
|
||||
TestComputerNameTemplateModel.TestComputerNameTemplateResultModel evaluateDevice(Disco.Models.Repository.Device device)
|
||||
TestComputerNameTemplateModel.TestComputerNameTemplateResultModel evaluateDevice(Device device)
|
||||
{
|
||||
var evaluatorVariables = Expression.StandardVariables(null, Database, UserService.CurrentUser, DateTime.Now, null, device);
|
||||
var deviceResult = new TestComputerNameTemplateModel.TestComputerNameTemplateResultModel()
|
||||
|
||||
@@ -509,8 +509,8 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
public virtual ActionResult ImporterUndetectedFiles()
|
||||
{
|
||||
var undetectedLocation = DataStore.CreateLocation(Database, "DocumentDropBox_Unassigned");
|
||||
var undetectedDirectory = new System.IO.DirectoryInfo(undetectedLocation);
|
||||
var m = undetectedDirectory.GetFiles("*.pdf").Select(f => new Models.DocumentTemplate.ImporterUndetectedFilesModel()
|
||||
var undetectedDirectory = new DirectoryInfo(undetectedLocation);
|
||||
var m = undetectedDirectory.GetFiles("*.pdf").Select(f => new ImporterUndetectedFilesModel()
|
||||
{
|
||||
Id = System.IO.Path.GetFileNameWithoutExtension(f.Name),
|
||||
Timestamp = f.CreationTime.ToFullDateTime(),
|
||||
@@ -554,7 +554,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
}
|
||||
if (searchScope != null)
|
||||
{
|
||||
Models.DocumentTemplate.ImporterUndetectedDataIdLookupModel[] results;
|
||||
ImporterUndetectedDataIdLookupModel[] results;
|
||||
switch (searchScope)
|
||||
{
|
||||
case DocumentTemplate.DocumentTemplateScopes.Device:
|
||||
|
||||
@@ -236,7 +236,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
private void UpdateScope(DocumentTemplatePackage Package, string Scope)
|
||||
{
|
||||
AttachmentTypes scope;
|
||||
if (!Enum.TryParse<AttachmentTypes>(Scope, true, out scope))
|
||||
if (!Enum.TryParse(Scope, true, out scope))
|
||||
throw new ArgumentException("Invalid Scope", nameof(Scope));
|
||||
|
||||
if (Package.Scope != scope)
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
const string pDefaultSLAExpiry = "defaultslaexpiry";
|
||||
|
||||
[DiscoAuthorize(Claims.Config.JobQueue.Configure)]
|
||||
public virtual ActionResult Update(int id, string key, string value = null, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult Update(int id, string key, string value = null, bool? redirect = null)
|
||||
{
|
||||
Authorization.Require(Claims.Config.JobQueue.Configure);
|
||||
|
||||
@@ -77,37 +77,37 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
|
||||
#region Update Shortcut Methods
|
||||
[DiscoAuthorize(Claims.Config.JobQueue.Configure)]
|
||||
public virtual ActionResult UpdateName(int id, string QueueName = null, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateName(int id, string QueueName = null, bool? redirect = null)
|
||||
{
|
||||
return Update(id, pName, QueueName, redirect);
|
||||
}
|
||||
|
||||
[DiscoAuthorize(Claims.Config.JobQueue.Configure)]
|
||||
public virtual ActionResult UpdateDescription(int id, string Description = null, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateDescription(int id, string Description = null, bool? redirect = null)
|
||||
{
|
||||
return Update(id, pDescription, Description, redirect);
|
||||
}
|
||||
|
||||
[DiscoAuthorize(Claims.Config.JobQueue.Configure)]
|
||||
public virtual ActionResult UpdatePriority(int id, string Priority = null, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdatePriority(int id, string Priority = null, bool? redirect = null)
|
||||
{
|
||||
return Update(id, pPriority, Priority, redirect);
|
||||
}
|
||||
|
||||
[DiscoAuthorize(Claims.Config.JobQueue.Configure)]
|
||||
public virtual ActionResult UpdateDefaultSLAExpiry(int id, string DefaultSLAExpiry = null, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateDefaultSLAExpiry(int id, string DefaultSLAExpiry = null, bool? redirect = null)
|
||||
{
|
||||
return Update(id, pDefaultSLAExpiry, DefaultSLAExpiry, redirect);
|
||||
}
|
||||
|
||||
[DiscoAuthorize(Claims.Config.JobQueue.Configure)]
|
||||
public virtual ActionResult UpdateIcon(int id, string Icon = null, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateIcon(int id, string Icon = null, bool? redirect = null)
|
||||
{
|
||||
return Update(id, pIcon, Icon, redirect);
|
||||
}
|
||||
|
||||
[DiscoAuthorize(Claims.Config.JobQueue.Configure)]
|
||||
public virtual ActionResult UpdateIconColour(int id, string IconColour = null, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateIconColour(int id, string IconColour = null, bool? redirect = null)
|
||||
{
|
||||
return Update(id, pIconColour, IconColour, redirect);
|
||||
}
|
||||
@@ -249,7 +249,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
{
|
||||
JobQueuePriority priority;
|
||||
|
||||
if (!Enum.TryParse<JobQueuePriority>(Priority, out priority))
|
||||
if (!Enum.TryParse(Priority, out priority))
|
||||
throw new ArgumentException("Invalid Priority Value", "Priority");
|
||||
|
||||
jobQueue.Priority = priority;
|
||||
@@ -312,7 +312,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateJobSubTypes(Disco.Models.Repository.JobQueue jobQueue, List<string> JobSubTypes)
|
||||
private void UpdateJobSubTypes(JobQueue jobQueue, List<string> JobSubTypes)
|
||||
{
|
||||
Database.Configuration.LazyLoadingEnabled = true;
|
||||
|
||||
@@ -326,7 +326,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
// Add New
|
||||
if (JobSubTypes != null && JobSubTypes.Count > 0)
|
||||
{
|
||||
var subTypes = new List<Disco.Models.Repository.JobSubType>();
|
||||
var subTypes = new List<JobSubType>();
|
||||
foreach (var stId in JobSubTypes)
|
||||
{
|
||||
var typeId = stId.Substring(0, stId.IndexOf("_"));
|
||||
@@ -342,7 +342,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
|
||||
#region Actions
|
||||
[DiscoAuthorize(Claims.Config.JobQueue.Delete)]
|
||||
public virtual ActionResult Delete(int id, Nullable<bool> redirect = false)
|
||||
public virtual ActionResult Delete(int id, bool? redirect = false)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
const string pSla = "sla";
|
||||
const string pPriority = "priority";
|
||||
|
||||
public virtual ActionResult Update(int id, string key, string value = null, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult Update(int id, string key, string value = null, bool? redirect = null)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -65,28 +65,28 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
|
||||
#region Update Shortcut Methods
|
||||
[DiscoAuthorizeAny(Claims.Job.Properties.JobQueueProperties.EditAnyComments, Claims.Job.Properties.JobQueueProperties.EditOwnComments)]
|
||||
public virtual ActionResult UpdateAddedComment(int id, string AddedComment = null, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateAddedComment(int id, string AddedComment = null, bool? redirect = null)
|
||||
{
|
||||
return Update(id, pAddedComment, AddedComment, redirect);
|
||||
}
|
||||
[DiscoAuthorizeAny(Claims.Job.Properties.JobQueueProperties.EditAnyComments, Claims.Job.Properties.JobQueueProperties.EditOwnComments)]
|
||||
public virtual ActionResult UpdateRemovedComment(int id, string RemovedComment = null, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateRemovedComment(int id, string RemovedComment = null, bool? redirect = null)
|
||||
{
|
||||
return Update(id, pRemovedComment, RemovedComment, redirect);
|
||||
}
|
||||
[DiscoAuthorizeAny(Claims.Job.Properties.JobQueueProperties.EditAnySLA, Claims.Job.Properties.JobQueueProperties.EditOwnSLA)]
|
||||
public virtual ActionResult UpdateSla(int id, string SLA = null, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateSla(int id, string SLA = null, bool? redirect = null)
|
||||
{
|
||||
return Update(id, pSla, SLA, redirect);
|
||||
}
|
||||
[DiscoAuthorizeAny(Claims.Job.Properties.JobQueueProperties.EditAnyPriority, Claims.Job.Properties.JobQueueProperties.EditOwnPriority)]
|
||||
public virtual ActionResult UpdatePriority(int id, string Priority = null, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdatePriority(int id, string Priority = null, bool? redirect = null)
|
||||
{
|
||||
return Update(id, pPriority, Priority, redirect);
|
||||
}
|
||||
[DiscoAuthorizeAny(Claims.Job.Properties.JobQueueProperties.EditAnySLA, Claims.Job.Properties.JobQueueProperties.EditOwnSLA,
|
||||
Claims.Job.Properties.JobQueueProperties.EditAnyPriority, Claims.Job.Properties.JobQueueProperties.EditOwnPriority)]
|
||||
public virtual ActionResult UpdateSlaAndPriority(int id, string Sla = null, string Priority = null, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateSlaAndPriority(int id, string Sla = null, string Priority = null, bool? redirect = null)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -166,7 +166,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
|
||||
JobQueuePriority priority;
|
||||
|
||||
if (!Enum.TryParse<JobQueuePriority>(Priority, out priority))
|
||||
if (!Enum.TryParse(Priority, out priority))
|
||||
throw new ArgumentException("Invalid Priority Value", "Priority");
|
||||
|
||||
jobQueueJob.OnEditPriority(priority);
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
const string pOnUnassignmentExpression = "onunassignmentexpression";
|
||||
|
||||
[DiscoAuthorize(Claims.Config.UserFlag.Configure)]
|
||||
public virtual ActionResult Update(int id, string key, string value = null, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult Update(int id, string key, string value = null, bool? redirect = null)
|
||||
{
|
||||
Authorization.Require(Claims.Config.UserFlag.Configure);
|
||||
|
||||
@@ -81,25 +81,25 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
|
||||
#region Update Shortcut Methods
|
||||
[DiscoAuthorize(Claims.Config.UserFlag.Configure)]
|
||||
public virtual ActionResult UpdateName(int id, string FlagName = null, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateName(int id, string FlagName = null, bool? redirect = null)
|
||||
{
|
||||
return Update(id, pName, FlagName, redirect);
|
||||
}
|
||||
|
||||
[DiscoAuthorize(Claims.Config.UserFlag.Configure)]
|
||||
public virtual ActionResult UpdateDescription(int id, string Description = null, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateDescription(int id, string Description = null, bool? redirect = null)
|
||||
{
|
||||
return Update(id, pDescription, Description, redirect);
|
||||
}
|
||||
|
||||
[DiscoAuthorize(Claims.Config.UserFlag.Configure)]
|
||||
public virtual ActionResult UpdateIcon(int id, string Icon = null, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateIcon(int id, string Icon = null, bool? redirect = null)
|
||||
{
|
||||
return Update(id, pIcon, Icon, redirect);
|
||||
}
|
||||
|
||||
[DiscoAuthorize(Claims.Config.UserFlag.Configure)]
|
||||
public virtual ActionResult UpdateIconColour(int id, string IconColour = null, Nullable<bool> redirect = null)
|
||||
public virtual ActionResult UpdateIconColour(int id, string IconColour = null, bool? redirect = null)
|
||||
{
|
||||
return Update(id, pIconColour, IconColour, redirect);
|
||||
}
|
||||
@@ -349,7 +349,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
|
||||
#region Actions
|
||||
[DiscoAuthorizeAll(Claims.Config.UserFlag.Configure, Claims.Config.UserFlag.Delete)]
|
||||
public virtual ActionResult Delete(int id, Nullable<bool> redirect = false)
|
||||
public virtual ActionResult Delete(int id, bool? redirect = false)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace Disco.Web.Areas.Config.Controllers
|
||||
else
|
||||
{
|
||||
// List Index
|
||||
var m = new Models.DeviceFlag.IndexModel()
|
||||
var m = new IndexModel()
|
||||
{
|
||||
DeviceFlags = Database.DeviceFlags
|
||||
.Select(uf => new
|
||||
|
||||
@@ -73,14 +73,14 @@ namespace Disco.Web.Areas.Config.Controllers
|
||||
m.CertificateAuthorityProviders = Plugins.GetPluginFeatures(typeof(CertificateAuthorityProviderFeature));
|
||||
m.WirelessProfileProviders = Plugins.GetPluginFeatures(typeof(WirelessProfileProviderFeature));
|
||||
|
||||
var DistributionValues = Enum.GetValues(typeof(Disco.Models.Repository.DeviceProfile.DistributionTypes));
|
||||
var DistributionValues = Enum.GetValues(typeof(DeviceProfile.DistributionTypes));
|
||||
m.DeviceProfileDistributionTypes = new List<SelectListItem>();
|
||||
foreach (int value in DistributionValues)
|
||||
{
|
||||
m.DeviceProfileDistributionTypes.Add(new SelectListItem()
|
||||
{
|
||||
Value = value.ToString(),
|
||||
Text = Enum.GetName(typeof(Disco.Models.Repository.DeviceProfile.DistributionTypes), value),
|
||||
Text = Enum.GetName(typeof(DeviceProfile.DistributionTypes), value),
|
||||
Selected = ((int)m.DeviceProfile.DistributionType == value)
|
||||
});
|
||||
}
|
||||
@@ -163,7 +163,7 @@ namespace Disco.Web.Areas.Config.Controllers
|
||||
DefaultAddDeviceOffline = Database.DiscoConfiguration.DeviceProfiles.DefaultAddDeviceOfflineDeviceProfileId
|
||||
};
|
||||
m.DeviceProfilesAndNone = m.DeviceProfiles.ToList();
|
||||
m.DeviceProfilesAndNone.Insert(0, new Disco.Models.Repository.DeviceProfile() { Id = 0, Name = "<No Default>" });
|
||||
m.DeviceProfilesAndNone.Insert(0, new DeviceProfile() { Id = 0, Name = "<No Default>" });
|
||||
|
||||
// UI Extensions
|
||||
UIExtensions.ExecuteExtensions<ConfigDeviceProfileDefaultsModel>(this.ControllerContext, m);
|
||||
|
||||
@@ -83,7 +83,7 @@ namespace Disco.Web.Areas.Config.Controllers
|
||||
// Default Queue
|
||||
var m = new Models.JobQueue.CreateModel()
|
||||
{
|
||||
JobQueue = new Disco.Models.Repository.JobQueue()
|
||||
JobQueue = new JobQueue()
|
||||
{
|
||||
Icon = JobQueueService.RandomUnusedIcon(),
|
||||
IconColour = JobQueueService.RandomUnusedThemeColour(),
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace Disco.Web.Areas.Config.Controllers
|
||||
[DiscoAuthorize(Claims.Config.Plugin.Show), HttpGet]
|
||||
public virtual ActionResult Index()
|
||||
{
|
||||
Models.Plugins.IndexViewModel vm = new Models.Plugins.IndexViewModel()
|
||||
IndexViewModel vm = new IndexViewModel()
|
||||
{
|
||||
PluginManifests = Plugins.GetPlugins(),
|
||||
PluginLibrary = PluginLibrary.LoadManifest(Database)
|
||||
@@ -80,7 +80,7 @@ namespace Disco.Web.Areas.Config.Controllers
|
||||
}
|
||||
else
|
||||
{
|
||||
var model = new Models.Plugins.InstallModel()
|
||||
var model = new InstallModel()
|
||||
{
|
||||
Library = library
|
||||
};
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace Disco.Web.Areas.Config.Controllers
|
||||
{
|
||||
// Show
|
||||
var m = Database.UserFlags.Where(f => f.Id == id.Value).Select(f =>
|
||||
new Models.UserFlag.ShowModel()
|
||||
new ShowModel()
|
||||
{
|
||||
UserFlag = f,
|
||||
CurrentAssignmentCount = f.UserFlagAssignments.Count(a => !a.RemovedDate.HasValue),
|
||||
@@ -57,7 +57,7 @@ namespace Disco.Web.Areas.Config.Controllers
|
||||
else
|
||||
{
|
||||
// List Index
|
||||
var m = new Models.UserFlag.IndexModel()
|
||||
var m = new IndexModel()
|
||||
{
|
||||
UserFlags = Database.UserFlags
|
||||
.Select(uf => new
|
||||
@@ -81,7 +81,7 @@ namespace Disco.Web.Areas.Config.Controllers
|
||||
public virtual ActionResult Create()
|
||||
{
|
||||
// Default Queue
|
||||
var m = new Models.UserFlag.CreateModel()
|
||||
var m = new CreateModel()
|
||||
{
|
||||
UserFlag = new UserFlag()
|
||||
{
|
||||
@@ -97,7 +97,7 @@ namespace Disco.Web.Areas.Config.Controllers
|
||||
}
|
||||
|
||||
[DiscoAuthorizeAll(Claims.Config.UserFlag.Create, Claims.Config.UserFlag.Configure), HttpPost]
|
||||
public virtual ActionResult Create(Models.UserFlag.CreateModel model)
|
||||
public virtual ActionResult Create(CreateModel model)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
public class EditorModel
|
||||
{
|
||||
public string Expression { get; set; }
|
||||
public Disco.Web.Areas.API.Models.Expressions.ValidateExpressionModel ExpressionException { get; set; }
|
||||
public API.Models.Expressions.ValidateExpressionModel ExpressionException { get; set; }
|
||||
public string TestScope { get; set; }
|
||||
public string TestScopeDataType { get; set; }
|
||||
public string TestScopeDataId { get; set; }
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace Disco.Web
|
||||
|
||||
public static HtmlHelper GetPageHelper(this System.Web.WebPages.Html.HtmlHelper html)
|
||||
{
|
||||
return ((System.Web.Mvc.WebViewPage)WebPageContext.Current.Page).Html;
|
||||
return ((WebViewPage)WebPageContext.Current.Page).Html;
|
||||
}
|
||||
|
||||
#region T4MVC Disco Extensions
|
||||
@@ -66,7 +66,7 @@ namespace Disco.Web
|
||||
}
|
||||
public static MvcHtmlString OrganisationLogoUrl(this UrlHelper urlHelper, int Width = 256, int Height = 256)
|
||||
{
|
||||
var config = new Disco.Data.Configuration.SystemConfiguration(null);
|
||||
var config = new Data.Configuration.SystemConfiguration(null);
|
||||
return new MvcHtmlString(urlHelper.Action(MVC.API.System.OrganisationLogo(Width, Height, config.OrganisationLogoHash)));
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace Disco.Web.Controllers
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
public virtual System.Web.Mvc.ActionResult Show(string id)
|
||||
public virtual ActionResult Show(string id)
|
||||
{
|
||||
var callInfo = new T4MVC_System_Web_Mvc_ActionResult(Area, Name, ActionNames.Show);
|
||||
|
||||
|
||||
@@ -183,7 +183,7 @@ namespace Disco.Web
|
||||
}
|
||||
#endregion
|
||||
#region Dropbox Monitor
|
||||
public static Disco.Services.Documents.AttachmentImport.ImportDirectoryMonitor DocumentDropBoxMonitor { get; set; }
|
||||
public static Services.Documents.AttachmentImport.ImportDirectoryMonitor DocumentDropBoxMonitor { get; set; }
|
||||
#endregion
|
||||
#region Global Error Logging
|
||||
void DiscoApplication_Error(object sender, EventArgs e)
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace Disco.Web.Models.Job
|
||||
[Required]
|
||||
public int JobId { get; set; }
|
||||
[Required(ErrorMessage = "Please specify a Repair Address")]
|
||||
public Nullable<int> OrganisationAddressId { get; set; }
|
||||
public int? OrganisationAddressId { get; set; }
|
||||
[Required(ErrorMessage = "Please specify a Repair Provider")]
|
||||
public string RepairProviderId { get; set; }
|
||||
[Required(ErrorMessage = "A fault description is required"), DataType(System.ComponentModel.DataAnnotations.DataType.MultilineText)]
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace Disco.Web.Models.Job
|
||||
[Required]
|
||||
public int JobId { get; set; }
|
||||
[Required(ErrorMessage = "Please specify a Repair Address")]
|
||||
public Nullable<int> OrganisationAddressId { get; set; }
|
||||
public int? OrganisationAddressId { get; set; }
|
||||
[Required(ErrorMessage = "Please specify a Warranty Provider")]
|
||||
public string WarrantyProviderId { get; set; }
|
||||
[Required(ErrorMessage = "A fault description is required"), DataType(System.ComponentModel.DataAnnotations.DataType.MultilineText)]
|
||||
|
||||
Reference in New Issue
Block a user