48 lines
2.1 KiB
C#
48 lines
2.1 KiB
C#
using System.Data;
|
|
using System.Text;
|
|
using Kreta.BusinessLogic.Classes;
|
|
|
|
namespace Kreta.BusinessLogic.HelperClasses.SZIRAdatszolgaltatasCOs
|
|
{
|
|
public class KonyvtarAdatszolgaltatasItemCo
|
|
{
|
|
public KonyvtarAdatszolgaltatasItemCo(DataRow dataRow)
|
|
{
|
|
ID = SDAConvert.ToNullableInt32(dataRow["ID"]);
|
|
SzirId = SDAConvert.ToNullableInt32(dataRow.Field<int?>("SzirId"));
|
|
Nyitoadat = SDAConvert.ToNullableInt32(dataRow.Field<int?>("Nyitoadat"));
|
|
NyitoadatNemzetisegi = SDAConvert.ToNullableInt32(dataRow.Field<int?>("NyitoadatNemzetisegi"));
|
|
Gyarapodas = SDAConvert.ToNullableInt32(dataRow.Field<int?>("Gyarapodas"));
|
|
Forgalom = SDAConvert.ToNullableInt32(dataRow.Field<int?>("Forgalom"));
|
|
Sorszam = SDAConvert.ToInt32(dataRow.Field<long>("Sorszam"));
|
|
Szint = SDAConvert.ToInt32(dataRow.Field<int>("Szint"));
|
|
StringBuilder sb = new StringBuilder();
|
|
for (var i = 0; i < Szint - 1; i++)
|
|
{
|
|
if (i == 0)
|
|
{
|
|
sb = sb.Append("- ");
|
|
}
|
|
sb = sb.Insert(0, " ");
|
|
}
|
|
Nev = sb.Append(SDAConvert.ToStringForExcelCell(dataRow.Field<string>("Nev"))).ToString();
|
|
KategoriaId = SDAConvert.ToInt32(dataRow.Field<int>("KategoriaId"));
|
|
}
|
|
|
|
public int? ID { get; set; }
|
|
public int? SzirId { get; set; }
|
|
public int? Nyitoadat { get; set; }
|
|
public int? NyitoadatNemzetisegi { get; set; }
|
|
public int? Gyarapodas { get; set; }
|
|
public int? Forgalom { get; set; }
|
|
public int Sorszam { get; set; }
|
|
public string Nev { get; set; }
|
|
public int Szint { get; set; }
|
|
public int KategoriaId { get; set; }
|
|
public bool IsNyitoadatEditable => (Sorszam <= 11);
|
|
public bool IsNyitoadatNemzetisegiEditable => (Sorszam <= 11) && (Sorszam != 6);
|
|
public bool IsGyarapodasEditable => (Sorszam <= 12);
|
|
public bool IsForgalomEditable => (Sorszam >= 13);
|
|
|
|
}
|
|
}
|