当前位置: 首页>>代码示例>>C#>>正文


C# IEntityBase类代码示例

本文整理汇总了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);
        }
开发者ID:TheaP,项目名称:c-raft,代码行数:27,代码来源:BlockWoodenStairs.cs

示例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;

             }
        }
开发者ID:ArquitecturaSoftware,项目名称:texfinadev,代码行数:26,代码来源:TablaCorre.cs

示例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;

             }
        }
开发者ID:ArquitecturaSoftware,项目名称:texfinadev,代码行数:25,代码来源:Banco.cs

示例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;

              }
        }
开发者ID:ArquitecturaSoftware,项目名称:texfinadev,代码行数:33,代码来源:ProcPlaCalc.cs

示例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;

             }
        }
开发者ID:ArquitecturaSoftware,项目名称:texfinadev,代码行数:27,代码来源:ConfigHora.cs

示例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;
                }
            });
        }
开发者ID:Klaudit,项目名称:inbox2_desktop,代码行数:34,代码来源:CommandQueue.cs

示例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;

             }
        }
开发者ID:ArquitecturaSoftware,项目名称:texfinadev,代码行数:27,代码来源:PrestaCuota.cs

示例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;

             }
        }
开发者ID:ArquitecturaSoftware,项目名称:texfinadev,代码行数:26,代码来源:TablaVCAcumDet.cs

示例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;

            }
        }
开发者ID:ArquitecturaSoftware,项目名称:texfinadev,代码行数:25,代码来源:TablaCF.cs

示例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;

             }
        }
开发者ID:ArquitecturaSoftware,项目名称:texfinadev,代码行数:27,代码来源:Usuario.cs

示例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;

            }
        }
开发者ID:ArquitecturaSoftware,项目名称:texfinadev,代码行数:29,代码来源:Personal.cs

示例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;

             }
        }
开发者ID:ArquitecturaSoftware,项目名称:texfinadev,代码行数:26,代码来源:VarCalc.cs

示例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;

            }
        }
开发者ID:ArquitecturaSoftware,项目名称:texfinadev,代码行数:31,代码来源:LiquidacionDet.cs

示例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;

            }
        }
开发者ID:ArquitecturaSoftware,项目名称:texfinadev,代码行数:27,代码来源:AfpComi.cs

示例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;

            }
        }
开发者ID:ArquitecturaSoftware,项目名称:texfinadev,代码行数:32,代码来源:Subsidio.cs


注:本文中的IEntityBase类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。