init
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Kreta.BusinessLogic.Logic;
|
||||
using Kreta.Enums.ManualEnums;
|
||||
using Kreta.Resources;
|
||||
|
||||
namespace Kreta.Web.Areas.Orarend.Models
|
||||
{
|
||||
public class TanuloHaziFeladatMentesModel
|
||||
{
|
||||
public int? Id { get; set; }
|
||||
|
||||
public int? TanarHaziFeladatId { get; set; }
|
||||
|
||||
public DateTime BejelentesDatuma { get; set; }
|
||||
|
||||
[Display(Name = nameof(OrarendResource.JavasoltHatarido), ResourceType = typeof(OrarendResource))]
|
||||
public DateTime? Hatarido { get; set; }
|
||||
|
||||
private string feladatSzovege;
|
||||
[Required(ErrorMessageResourceName = nameof(ErrorResource.FeladatSzovegeKitolteseKotelezo), ErrorMessageResourceType = typeof(ErrorResource))]
|
||||
public string FeladatSzovege
|
||||
{
|
||||
get { return feladatSzovege; }
|
||||
set
|
||||
{
|
||||
string szoveg = string.Empty;
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(value))
|
||||
{
|
||||
szoveg = RichTextLogic.GetLegalHtmlString(value, RichTextLogic.LegalFastReportHtmlTagList, true);
|
||||
}
|
||||
|
||||
feladatSzovege = szoveg;
|
||||
}
|
||||
}
|
||||
|
||||
public int RogzitoId { get; set; }
|
||||
|
||||
public int? OraId { get; set; }
|
||||
|
||||
public DateTime? OraDate { get; set; }
|
||||
|
||||
public CalendarOraTypeEnum? OraType { get; set; }
|
||||
|
||||
public bool ValidateModel()
|
||||
{
|
||||
if (TanarHaziFeladatId.HasValue || (Hatarido.HasValue && OraId.HasValue && OraType.HasValue && OraDate.HasValue))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user