init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
106
Kreta.DataAccessManual/NatKerdoivDal.cs
Normal file
106
Kreta.DataAccessManual/NatKerdoivDal.cs
Normal file
|
@ -0,0 +1,106 @@
|
|||
using System;
|
||||
using System.Data;
|
||||
using Kreta.DataAccess.Interfaces;
|
||||
using Kreta.DataAccessManual.Interfaces;
|
||||
using Kreta.DataAccessManual.Util;
|
||||
using Kreta.Enums;
|
||||
using Kreta.Framework;
|
||||
using Kreta.Framework.Util;
|
||||
using SDA.DataProvider;
|
||||
using SDA.Kreta.Entities;
|
||||
|
||||
namespace Kreta.DataAccessManual
|
||||
{
|
||||
internal class NatKerdoivDal : DataAccessBase, INatKerdoivDal
|
||||
{
|
||||
public NatKerdoivDal(DalHandler handler, GridParameters parameters) : base(handler, parameters)
|
||||
{
|
||||
}
|
||||
|
||||
public NatKerdoivDal(DalHandler handler) : base(handler)
|
||||
{
|
||||
}
|
||||
|
||||
public INATKerdoiv Get()
|
||||
{
|
||||
return NATKerdoiv.GiveAnInstance();
|
||||
}
|
||||
|
||||
public INATKerdoiv Get(int id)
|
||||
{
|
||||
var entity = Get() as NATKerdoiv;
|
||||
entity.LoadByID(id);
|
||||
return entity;
|
||||
}
|
||||
|
||||
public void Insert(INATKerdoiv dto)
|
||||
{
|
||||
var entity = dto as NATKerdoiv;
|
||||
entity.Insert();
|
||||
|
||||
dto.ID = entity.ID;
|
||||
DalHelper.Commit();
|
||||
}
|
||||
|
||||
public void FullUpdate(INATKerdoiv dto)
|
||||
{
|
||||
var entity = dto as NATKerdoiv;
|
||||
entity.FullUpdate();
|
||||
|
||||
DalHelper.Commit();
|
||||
}
|
||||
|
||||
public void Delete(INATKerdoiv dto)
|
||||
{
|
||||
var entity = dto as NATKerdoiv;
|
||||
entity.Delete();
|
||||
DalHelper.Commit();
|
||||
}
|
||||
|
||||
public DataSet GetNatKerdoivDataSetByAlkalmazott(int intezmenyId, int tanevId, int alkalmazottId)
|
||||
{
|
||||
using (var command = new SDACommand())
|
||||
{
|
||||
command.Connection = UserContext.Instance.SDAConnection;
|
||||
command.Transaction = UserContext.Instance.SDATransaction;
|
||||
|
||||
command.CommandType = CommandType.StoredProcedure;
|
||||
command.CommandText = "sp_GetNatKerdoivDataSetByAlkalmazott";
|
||||
|
||||
command.Parameters.Add("pIntezmenyId", intezmenyId);
|
||||
command.Parameters.Add("pTanevId", tanevId);
|
||||
command.Parameters.Add("pAlkalmazottId", alkalmazottId);
|
||||
|
||||
var ds = new DataSet();
|
||||
using (var adapter = new SDADataAdapter())
|
||||
{
|
||||
adapter.SelectCommand = command;
|
||||
adapter.Fill(ds);
|
||||
}
|
||||
|
||||
return ds;
|
||||
}
|
||||
}
|
||||
|
||||
public bool GetShowNatKerdoivPopup(int intezmenyId, int tanevId, int alkalmazottId)
|
||||
{
|
||||
bool result;
|
||||
using (SDACommand command = new SDACommand())
|
||||
{
|
||||
command.Connection = UserContext.Instance.SDAConnection;
|
||||
command.Transaction = UserContext.Instance.SDATransaction;
|
||||
command.CommandType = CommandType.StoredProcedure;
|
||||
|
||||
command.CommandText = "sp_GetShowNatKerdoivPopup";
|
||||
|
||||
command.Parameters.Add("pIntezmenyId", intezmenyId);
|
||||
command.Parameters.Add("pTanevId", tanevId);
|
||||
command.Parameters.Add("pAlkalmazottId", alkalmazottId);
|
||||
command.Parameters.Add("pBesorolasiFokozatTipusNa", (int)BesorolasiFokozatTipusEnum.na);
|
||||
|
||||
result = Convert.ToBoolean(command.ExecuteScalar());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue