Migracja z NAS do Gitea
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
using Soneta.Business;
|
||||
using Soneta.Kalend;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FX2_SP_VERIFIERS.PrawidlowoscDaneRCP
|
||||
{
|
||||
public class PrawidlowoscDaneRCPInitializer : IProgramInitializer
|
||||
{
|
||||
public void Initialize()
|
||||
{
|
||||
KalendModule.WejscieWyjscieISchema.AddGodzinaAfterEdit((KalendModule.WejscieWyjscieIRow Row) =>
|
||||
{
|
||||
Row.Session.Verifiers.Add(new PrawidlowoscDaneRCPVerifier(Row));
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
using Soneta.Business;
|
||||
using Soneta.Core;
|
||||
using Soneta.Kalend;
|
||||
using Soneta.Types;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FX2_SP_VERIFIERS.PrawidlowoscDaneRCP
|
||||
{
|
||||
public class PrawidlowoscDaneRCPVerifier : RowVerifier
|
||||
{
|
||||
public PrawidlowoscDaneRCPVerifier(IRow row) : base(row)
|
||||
{
|
||||
}
|
||||
|
||||
public override string Description => "Brak godziny wpisu";
|
||||
|
||||
public override VerifierType Type => VerifierType.Error;
|
||||
|
||||
private new WejscieWyjscieI Row => (WejscieWyjscieI)base.Row;
|
||||
|
||||
protected override bool IsValid()
|
||||
{
|
||||
if (Row.Godzina == Time.Empty || Row.Godzina == Time.MaxValue || Row.Godzina == Time.MinValue)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user