• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IEntityBase类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IEntityBase的典型用法代码示例。如果您正苦于以下问题:C# IEntityBase类的具体用法?C# IEntityBase怎么用?C# IEntityBase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IEntityBase类属于命名空间,在下文中一共展示了IEntityBase类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: Delete

        public int Delete(IEntityBase value)
        {
            EPerExpeLabo objE = (EPerExpeLabo)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("@pnuSecuen", SqlDbType.SmallInt, objE.NuSecuen));

                int intRes = this.ExecuteNonQuery("RH_PerExpeLabo_mnt03", arrPrm);

                return intRes;

            }
            catch (Exception ex)
            {

                ServerObjectException objEx = (ServerObjectException)this.GetException(MethodBase.GetCurrentMethod(), ex);
                throw objEx;

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


示例17: GetByKey

        public IEntityBase GetByKey(IEntityBase value)
        {
            ESubsidio objE = (ESubsidio)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("@pidPersonal", SqlDbType.Char, 7, objE.IdPersonal));
                arrPrm.Add(DataHelper.CreateParameter("@pidSubsidio", SqlDbType.Char, 4, objE.IdSubsidio));

                DataTable dt = this.ExecuteDatatable("RH_Subsidio_qry02", arrPrm);

                objE = null;

                foreach (DataRow dr in dt.Rows)
                    objE = DataHelper.CopyDataRowToEntity<ESubsidio>(dr, typeof(ESubsidio));

                return objE;

            }
            catch (Exception ex)
            {

                ServerObjectException objEx = (ServerObjectException)this.GetException(MethodBase.GetCurrentMethod(), ex);
                throw objEx;

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


示例18: Insert

        public object[] Insert(IEntityBase value)
        {
            EPerExpeLabo objE = (EPerExpeLabo)value;

            ////----------- Generacion de Codigos ------------------
            //TablaCorre objDO = new TablaCorre();
            //ETablaCorre objECorre = new ETablaCorre();

            ////objECorre.IdPeriodo = objE.IdPeriodo;
            //objECorre.IdEmpresa = objE.IdEmpresa;
            //objECorre.IdTabla = "RH_PerExpeLabo";

            //string strNewCode = objDO.GenNewCode(objECorre);
            //objE.IdEmpresa = strNewCode;

            //----------------------------------------------------
            ArrayList arrPrm = BuildParamInterface(objE);

            try
            {
                int intRes = this.ExecuteNonQuery("RH_PerExpeLabo_mnt01", arrPrm);

                return new object[] { objE.IdEmpresa };

            }
            catch (Exception ex)
            {

                ServerObjectException objEx = (ServerObjectException)this.GetException(MethodBase.GetCurrentMethod(), ex);
                throw objEx;

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


示例19: GetByCriteria

        public DataTable GetByCriteria(IEntityBase value)
        {
            EClienteBandeja objE = (EClienteBandeja)value;

            try
            {

                ArrayList arrPrm = new ArrayList();
                arrPrm.Add(DataHelper.CreateParameter("@pidEmpresa", SqlDbType.Char, 3, objE.IdEmpresa));
                arrPrm.Add(DataHelper.CreateParameter("@pidCliente", SqlDbType.Char, 7, objE.IdCliente));
                arrPrm.Add(DataHelper.CreateParameter("@pnuNif", SqlDbType.VarChar, 20, objE.NuNif));
                arrPrm.Add(DataHelper.CreateParameter("@pdsRazSocial", SqlDbType.VarChar, 150, objE.DsRazSocial));

                DataTable dt = this.ExecuteDatatable("PD_Clientes_qry01", arrPrm);

                return dt;

            }
            catch (Exception ex)
            {

                ServerObjectException objEx = (ServerObjectException)this.GetException(MethodBase.GetCurrentMethod(), ex);
                throw objEx;

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


示例20: GetByCriteria

        public DataTable GetByCriteria(IEntityBase value)
        {
            ELiquidacionBandeja objE = (ELiquidacionBandeja)value;

            try
            {

                ArrayList arrPrm = new ArrayList();

                arrPrm.Add(DataHelper.CreateParameter("@pidEmpresa", SqlDbType.Char, 3, objE.IdEmpresa));
                arrPrm.Add(DataHelper.CreateParameter("@pidLiquidacion", SqlDbType.VarChar, 7, objE.IdLiquidacion));
                arrPrm.Add(DataHelper.CreateParameter("@pidPersonal", SqlDbType.Char, 7, objE.IdPersonal));
                arrPrm.Add(DataHelper.CreateParameter("@pnuDocIden", SqlDbType.VarChar, 20, objE.NuDocIden));
                arrPrm.Add(DataHelper.CreateParameter("@pdsApellNom", SqlDbType.VarChar,150,objE.DsApellNom));

                DataTable dt = this.ExecuteDatatable("RH_Liquidacion_qry01", arrPrm);

                return dt;

            }
            catch (Exception ex)
            {

                ServerObjectException objEx = (ServerObjectException)this.GetException(MethodBase.GetCurrentMethod(), ex);
                throw objEx;

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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IEntityCollection类代码示例发布时间:2022-05-24
下一篇:
C# IEntity类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap