本文整理汇总了C#中IEntityBase类的典型用法代码示例。如果您正苦于以下问题:C# IEntityBase类的具体用法?C# IEntityBase怎么用?C# IEntityBase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IEntityBase类属于命名空间,在下文中一共展示了IEntityBase类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Place
public override void Place(IEntityBase entity, IStructBlock iBlock, IStructBlock targetIBlock, BlockFace face)
{
var block = (StructBlock)iBlock;
var living = entity as LivingEntity;
if (living == null)
return;
// TODO: Bugged - should depend on the player's Yaw/Pitch
switch (living.FacingDirection(4))
{
case "N":
block.MetaData = (byte)MetaData.Stairs.South;
break;
case "E":
block.MetaData = (byte)MetaData.Stairs.West;
break;
case "S":
block.MetaData = (byte)MetaData.Stairs.North;
break;
case "W":
block.MetaData = (byte)MetaData.Stairs.East;
break;
default:
return;
}
base.Place(entity, block, targetIBlock, face);
}
示例2: Delete
public int Delete(IEntityBase value)
{
ETablaCorre objE = (ETablaCorre)value;
try
{
ArrayList arrPrm = new ArrayList();
arrPrm.Add(DataHelper.CreateParameter("@pidPeriodo", SqlDbType.Char, 4, objE.IdPeriodo));
arrPrm.Add(DataHelper.CreateParameter("@pidEmpresa", SqlDbType.Char, 3, objE.IdEmpresa));
arrPrm.Add(DataHelper.CreateParameter("@pidTabla", SqlDbType.VarChar, 10, objE.IdTabla));
int intRes = this.ExecuteNonQuery("SY_TablaCorre_mnt03", arrPrm);
return intRes;
}
catch (Exception ex)
{
ServerObjectException objEx = (ServerObjectException)this.GetException(MethodBase.GetCurrentMethod(), ex);
throw objEx;
}
}
示例3: Exists
public bool Exists(IEntityBase value)
{
EBanco objE = (EBanco)value;
try
{
ArrayList arrPrm = BuildParamInterface(objE);
int intIdx = arrPrm.Add(DataHelper.CreateParameter("@pexists", SqlDbType.Char, 1, ParameterDirection.InputOutput, "0"));
SqlParameter[] objPrm = (SqlParameter[])arrPrm.ToArray(typeof(SqlParameter));
DataTable dt = this.ExecuteDatatable("MG_Banco_qry05", arrPrm);
return objPrm[intIdx].Value.ToString() == "1" ? true : false;
}
catch (Exception ex)
{
ServerObjectException objEx = (ServerObjectException)this.GetException(MethodBase.GetCurrentMethod(), ex);
throw objEx;
}
}
示例4: CrearHorasSubsidio
/// <summary>
/// Crea Horas Para Subsidio
/// </summary>
/// <param name="value"></param>
/// <returns></returns>
public int CrearHorasSubsidio(IEntityBase value)
{
EProcPlaCalc objE = (EProcPlaCalc)value;
try
{
ArrayList arrPrm = new ArrayList();
arrPrm.Add(DataHelper.CreateParameter("@pidPeriodo", SqlDbType.Char, 4, objE.IdPeriodo));
arrPrm.Add(DataHelper.CreateParameter("@pidEmpresa", SqlDbType.Char, 3, objE.IdEmpresa));
arrPrm.Add(DataHelper.CreateParameter("@pidPlanilla", SqlDbType.Char, 3, objE.IdPlanilla));
arrPrm.Add(DataHelper.CreateParameter("@pidForPago", SqlDbType.Char, 3, objE.IdForPago));
arrPrm.Add(DataHelper.CreateParameter("@pnuProcAnual", SqlDbType.SmallInt, objE.NuProcAnual));
int intRes = this.ExecuteNonQuery("RH_ProcPlaCalc_ope08", arrPrm);
return intRes;
}
catch (Exception ex)
{
ServerObjectException objEx = (ServerObjectException)this.GetException(MethodBase.GetCurrentMethod(), ex);
throw objEx;
}
}
示例5: DeleteData
public int DeleteData(IEntityBase value)
{
EConfigHoraSet objE = (EConfigHoraSet)value;
try
{
using (TransactionScope tx = new TransactionScope())
{
this.DeleteDetail(objE.ColConfigHora, false);
//this.DeleteMaster(objE.EConfigHora);
tx.Complete();
}
return 1;
}
catch (Exception ex)
{
throw ex;
}
}
示例6: Enqueue
public static void Enqueue(AppCommands commandType, IEntityBase entity, ExecutionTrigger trigger, object value, ModifyAction modifyAction)
{
var command = new QueuedCommand
{
CommandType = commandType,
Target = entity.UniqueId,
Status = ExecutionStatus.Pending,
TriggerType = trigger,
Value = value.ToString(),
ModifyAction = modifyAction,
DateCreated = DateTime.Now,
DateScheduled = DateTime.Now
};
ThreadPool.QueueUserWorkItem(delegate
{
ClientState.Current.DataService.Save(command);
switch (trigger)
{
case ExecutionTrigger.Connection:
EventBroker.Publish(AppEvents.RequestCommands);
break;
case ExecutionTrigger.Send:
EventBroker.Publish(AppEvents.RequestSend);
break;
case ExecutionTrigger.Receive:
EventBroker.Publish(AppEvents.RequestReceive);
break;
}
});
}
示例7: GetByCriteria
public DataTable GetByCriteria(IEntityBase value)
{
EPrestaCuota objE = (EPrestaCuota)value;
try
{
ArrayList arrPrm = new ArrayList();
arrPrm.Add(DataHelper.CreateParameter("@pidEmpresa", SqlDbType.Char, 3, objE.IdEmpresa));
arrPrm.Add(DataHelper.CreateParameter("@pidPersonal", SqlDbType.Char, 7, objE.IdPersonal));
arrPrm.Add(DataHelper.CreateParameter("@pidPrestamo", SqlDbType.Char, 4, objE.IdPrestamo));
arrPrm.Add(DataHelper.CreateParameter("@pnuCuota", SqlDbType.SmallInt, objE.NuCuota));
DataTable dt = this.ExecuteDatatable("RH_PrestaCuota_qry01", arrPrm);
return dt;
}
catch (Exception ex)
{
ServerObjectException objEx = (ServerObjectException)this.GetException(MethodBase.GetCurrentMethod(), ex);
throw objEx;
}
}
示例8: GetByCriteria
public DataTable GetByCriteria(IEntityBase value)
{
ETablaVCAcumDet objE = (ETablaVCAcumDet)value;
try
{
ArrayList arrPrm = new ArrayList();
arrPrm.Add(DataHelper.CreateParameter("@pidTablaVC", SqlDbType.Char, 3, objE.IdTablaVC));
arrPrm.Add(DataHelper.CreateParameter("@pidAcumula", SqlDbType.Char, 3, objE.IdAcumula));
arrPrm.Add(DataHelper.CreateParameter("@pidColumna", SqlDbType.Char, 3, objE.IdColumna));
DataTable dt = this.ExecuteDatatable("RH_TablaVCAcumDet_qry01", arrPrm);
return dt;
}
catch (Exception ex)
{
ServerObjectException objEx = (ServerObjectException)this.GetException(MethodBase.GetCurrentMethod(), ex);
throw objEx;
}
}
示例9: GetByCriteria
public DataTable GetByCriteria(IEntityBase value)
{
ETablaCF objE = (ETablaCF) value;
try
{
ArrayList arrPrm = new ArrayList();
arrPrm.Add(DataHelper.CreateParameter("@pidEditor", SqlDbType.Char,3, objE.IdEditor));
arrPrm.Add(DataHelper.CreateParameter("@pnuSeccion", SqlDbType.Char,1, objE.NuSeccion));
DataTable dt = this.ExecuteDatatable("RH_TablaCF_qry01", arrPrm);
return dt;
}
catch(Exception ex)
{
ServerObjectException objEx = (ServerObjectException) this.GetException(MethodBase.GetCurrentMethod(), ex);
throw objEx;
}
}
示例10: DeleteData
public int DeleteData(IEntityBase value)
{
EUsuarioSet objE = (EUsuarioSet)value;
try
{
using (TransactionScope tx = new TransactionScope())
{
this.DeleteDetail(objE.Usuario);
this.DeleteMaster(objE.Usuario);
tx.Complete();
}
return 1;
}
catch (Exception ex)
{
throw ex;
}
}
示例11: DeleteData
public int DeleteData(IEntityBase value)
{
EPersonalSet objE = (EPersonalSet)value;
try
{
using (TransactionScope tx = new TransactionScope())
{
this.DeleteDetailB(objE.ColPerContrato, true);
this.DeleteDetail(objE.ColPerDepen, true);
this.UpdateMasterB(objE.CliProv);
this.UpdateMaster(objE.Personal);
this.DeleteDetailE(objE.ColPerExpeLabo, true);
this.DeleteDetailF(objE.ColPerEducacion, true);
tx.Complete();
}
return 1;
}
catch (Exception ex)
{
throw ex;
}
}
示例12: GetByCriteria
public DataTable GetByCriteria(IEntityBase value)
{
EVarCalc objE = (EVarCalc)value;
try
{
ArrayList arrPrm = new ArrayList();
arrPrm.Add(DataHelper.CreateParameter("@pidVarCalc", SqlDbType.VarChar, 15, objE.IdVarCalc));
arrPrm.Add(DataHelper.CreateParameter("@pdsVarCalc", SqlDbType.VarChar, 25, objE.DsVarCalc));
arrPrm.Add(DataHelper.CreateParameter("@pidTipo", SqlDbType.Char, 2, objE.IdTipo));
DataTable dt = this.ExecuteDatatable("RH_VarCalc_qry01", arrPrm);
return dt;
}
catch (Exception ex)
{
ServerObjectException objEx = (ServerObjectException)this.GetException(MethodBase.GetCurrentMethod(), ex);
throw objEx;
}
}
示例13: Delete
public int Delete(IEntityBase value)
{
ELiquidacionDet objE = (ELiquidacionDet)value;
try
{
ArrayList arrPrm = new ArrayList();
arrPrm.Add(DataHelper.CreateParameter("@pidPeriodo", SqlDbType.Char, 4, objE.IdPeriodo));
arrPrm.Add(DataHelper.CreateParameter("@pidEmpresa", SqlDbType.Char, 3, objE.IdEmpresa));
arrPrm.Add(DataHelper.CreateParameter("@pidForPago", SqlDbType.Char, 3, objE.IdForPago));
arrPrm.Add(DataHelper.CreateParameter("@pidPlanilla", SqlDbType.Char, 3, objE.IdPlanilla));
arrPrm.Add(DataHelper.CreateParameter("@pnuProcAnual", SqlDbType.SmallInt, objE.NuProcAnual));
arrPrm.Add(DataHelper.CreateParameter("@pidPersonal", SqlDbType.Char, 7, objE.IdPersonal));
arrPrm.Add(DataHelper.CreateParameter("@pidLiquidacion", SqlDbType.Char, 4, objE.IdLiquidacion));
arrPrm.Add(DataHelper.CreateParameter("@pnuSecuen", SqlDbType.SmallInt, objE.NuSecuen));
int intRes = this.ExecuteNonQuery("RH_LiquidacionDet_mnt03", arrPrm);
return intRes;
}
catch (Exception ex)
{
ServerObjectException objEx = (ServerObjectException)this.GetException(MethodBase.GetCurrentMethod(), ex);
throw objEx;
}
}
示例14: Delete
public int Delete(IEntityBase value)
{
EAfpComi objE = (EAfpComi)value;
try
{
ArrayList arrPrm = new ArrayList();
arrPrm.Add(DataHelper.CreateParameter("@pidAfp", SqlDbType.Char, 3, objE.IdAfp));
arrPrm.Add(DataHelper.CreateParameter("@pidPeriodo", SqlDbType.Char, 4, objE.IdPeriodo));
arrPrm.Add(DataHelper.CreateParameter("@pidMes", SqlDbType.Char, 3, objE.IdMes));
arrPrm.Add(DataHelper.CreateParameter("@pidTipoComi", SqlDbType.Char, 3, objE.IdTipoComi));
int intRes = this.ExecuteNonQuery("RH_AfpComi_mnt03", arrPrm);
return intRes;
}
catch (Exception ex)
{
ServerObjectException objEx = (ServerObjectException)this.GetException(MethodBase.GetCurrentMethod(), ex);
throw objEx;
}
}
示例15: GetByCriteria
public DataTable GetByCriteria(IEntityBase value)
{
ESubsidioBandeja objE = (ESubsidioBandeja)value;
try
{
ArrayList arrPrm = new ArrayList();
arrPrm.Add(DataHelper.CreateParameter("@pidPeriodo", SqlDbType.Char, 4, objE.IdPeriodo));
arrPrm.Add(DataHelper.CreateParameter("@pidEmpresa", SqlDbType.Char, 3, objE.IdEmpresa));
arrPrm.Add(DataHelper.CreateParameter("@pidForPago", SqlDbType.Char, 3, objE.IdForPago));
arrPrm.Add(DataHelper.CreateParameter("@pidPlanilla", SqlDbType.Char, 3, objE.IdPlanilla));
arrPrm.Add(DataHelper.CreateParameter("@pnuProcAnual", SqlDbType.SmallInt, objE.NuProcAnual));
arrPrm.Add(DataHelper.CreateParameter("@pidPersonal", SqlDbType.Char, 7, objE.IdPersonal));
arrPrm.Add(DataHelper.CreateParameter("@pidSubsidio", SqlDbType.Char, 4, objE.IdSubsidio));
arrPrm.Add(DataHelper.CreateParameter("@pdsRazSocial", SqlDbType.VarChar, 150, objE.DsApellNom));
arrPrm.Add(DataHelper.CreateParameter("@pnuDocIden", SqlDbType.VarChar, 20, objE.NuDocIden));
DataTable dt = this.ExecuteDatatable("RH_Subsidio_qry01", arrPrm);
return dt;
}
catch (Exception ex)
{
ServerObjectException objEx = (ServerObjectException)this.GetException(MethodBase.GetCurrentMethod(), ex);
throw objEx;
}
}