示例#1
0
        public IRemoteDesktop Factory(protocol protocol)
        {
            switch (protocol)
            {
            case protocol.rdp:
                throw new NotImplementedException();

            case protocol.spice:
                return(new SpiceLinux());

            case protocol.vnc:
                throw new NotImplementedException();

            default:
                throw new NotImplementedException();
            }
        }
示例#2
0
        /// <summary>
        /// Converts this instance of <see cref="protocol"/> to an instance of <see cref="protocolDto"/>.
        /// </summary>
        /// <param name="entity"><see cref="protocol"/> to convert.</param>
        public static protocolDto ToDTO(this protocol entity)
        {
            if (entity == null)
            {
                return(null);
            }

            var dto = new protocolDto();

            dto.v_ProtocolId                = entity.v_ProtocolId;
            dto.v_Name                      = entity.v_Name;
            dto.v_EmployerOrganizationId    = entity.v_EmployerOrganizationId;
            dto.v_EmployerLocationId        = entity.v_EmployerLocationId;
            dto.i_EsoTypeId                 = entity.i_EsoTypeId;
            dto.v_GroupOccupationId         = entity.v_GroupOccupationId;
            dto.v_CustomerOrganizationId    = entity.v_CustomerOrganizationId;
            dto.v_CustomerLocationId        = entity.v_CustomerLocationId;
            dto.v_NombreVendedor            = entity.v_NombreVendedor;
            dto.v_WorkingOrganizationId     = entity.v_WorkingOrganizationId;
            dto.v_WorkingLocationId         = entity.v_WorkingLocationId;
            dto.v_CostCenter                = entity.v_CostCenter;
            dto.i_MasterServiceTypeId       = entity.i_MasterServiceTypeId;
            dto.i_MasterServiceId           = entity.i_MasterServiceId;
            dto.i_HasVigency                = entity.i_HasVigency;
            dto.i_ValidInDays               = entity.i_ValidInDays;
            dto.i_IsActive                  = entity.i_IsActive;
            dto.i_IsDeleted                 = entity.i_IsDeleted;
            dto.i_InsertUserId              = entity.i_InsertUserId;
            dto.d_InsertDate                = entity.d_InsertDate;
            dto.i_UpdateUserId              = entity.i_UpdateUserId;
            dto.d_UpdateDate                = entity.d_UpdateDate;
            dto.v_AseguradoraOrganizationId = entity.v_AseguradoraOrganizationId;
            dto.v_ComentaryUpdate           = entity.v_ComentaryUpdate;
            dto.r_PriceFactor               = entity.r_PriceFactor;
            dto.r_MedicineDiscount          = entity.r_MedicineDiscount;
            dto.r_HospitalBedPrice          = entity.r_HospitalBedPrice;
            dto.r_DiscountExam              = entity.r_DiscountExam;

            entity.OnDTO(dto);

            return(dto);
        }
示例#3
0
        public IRemoteDesktop Factory(protocol protocol)
        {
            switch (protocol)
            {
            case protocol.rdp:
                return(new RdpWin32());

            case protocol.spice:
                return(new SpiceWindows()
                {
                    FullScreen = Properties.Settings.Default.FullScreen
                });

            case protocol.vnc:
                return(new TightVnc());

            default:
                throw new NotImplementedException();
            }
        }
示例#4
0
        /// <summary>
        /// Converts this instance of <see cref="protocolDto"/> to an instance of <see cref="protocol"/>.
        /// </summary>
        /// <param name="dto"><see cref="protocolDto"/> to convert.</param>
        public static protocol ToEntity(this protocolDto dto)
        {
            if (dto == null)
            {
                return(null);
            }

            var entity = new protocol();

            entity.v_ProtocolId                = dto.v_ProtocolId;
            entity.v_Name                      = dto.v_Name;
            entity.v_EmployerOrganizationId    = dto.v_EmployerOrganizationId;
            entity.v_EmployerLocationId        = dto.v_EmployerLocationId;
            entity.i_EsoTypeId                 = dto.i_EsoTypeId;
            entity.v_GroupOccupationId         = dto.v_GroupOccupationId;
            entity.v_CustomerOrganizationId    = dto.v_CustomerOrganizationId;
            entity.v_CustomerLocationId        = dto.v_CustomerLocationId;
            entity.v_NombreVendedor            = dto.v_NombreVendedor;
            entity.v_WorkingOrganizationId     = dto.v_WorkingOrganizationId;
            entity.v_WorkingLocationId         = dto.v_WorkingLocationId;
            entity.v_CostCenter                = dto.v_CostCenter;
            entity.i_MasterServiceTypeId       = dto.i_MasterServiceTypeId;
            entity.i_MasterServiceId           = dto.i_MasterServiceId;
            entity.i_HasVigency                = dto.i_HasVigency;
            entity.i_ValidInDays               = dto.i_ValidInDays;
            entity.i_IsActive                  = dto.i_IsActive;
            entity.i_IsDeleted                 = dto.i_IsDeleted;
            entity.i_InsertUserId              = dto.i_InsertUserId;
            entity.d_InsertDate                = dto.d_InsertDate;
            entity.i_UpdateUserId              = dto.i_UpdateUserId;
            entity.d_UpdateDate                = dto.d_UpdateDate;
            entity.v_AseguradoraOrganizationId = dto.v_AseguradoraOrganizationId;

            dto.OnEntity(entity);

            return(entity);
        }
示例#5
0
        /// <summary>
        /// Converts this instance of <see cref="protocol"/> to an instance of <see cref="protocolDto"/>.
        /// </summary>
        /// <param name="entity"><see cref="protocol"/> to convert.</param>
        public static protocolDto ToDTO(this protocol entity)
        {
            if (entity == null)
            {
                return(null);
            }

            var dto = new protocolDto();

            dto.v_ProtocolId             = entity.v_ProtocolId;
            dto.v_Name                   = entity.v_Name;
            dto.v_EmployerOrganizationId = entity.v_EmployerOrganizationId;
            dto.v_EmployerLocationId     = entity.v_EmployerLocationId;
            dto.i_EsoTypeId              = entity.i_EsoTypeId;
            dto.v_GroupOccupationId      = entity.v_GroupOccupationId;
            dto.v_CustomerOrganizationId = entity.v_CustomerOrganizationId;
            dto.v_CustomerLocationId     = entity.v_CustomerLocationId;
            dto.v_NombreVendedor         = entity.v_NombreVendedor;
            dto.v_WorkingOrganizationId  = entity.v_WorkingOrganizationId;
            dto.v_WorkingLocationId      = entity.v_WorkingLocationId;
            dto.v_CostCenter             = entity.v_CostCenter;
            dto.i_MasterServiceTypeId    = entity.i_MasterServiceTypeId;
            dto.i_MasterServiceId        = entity.i_MasterServiceId;
            dto.i_HasVigency             = entity.i_HasVigency;
            dto.i_ValidInDays            = entity.i_ValidInDays;
            dto.i_IsActive               = entity.i_IsActive;
            dto.i_IsDeleted              = entity.i_IsDeleted;
            dto.i_InsertUserId           = entity.i_InsertUserId;
            dto.d_InsertDate             = entity.d_InsertDate;
            dto.i_UpdateUserId           = entity.i_UpdateUserId;
            dto.d_UpdateDate             = entity.d_UpdateDate;

            entity.OnDTO(dto);

            return(dto);
        }
示例#6
0
文件: FTNN.cs 项目: dominwong4/FTNN
 /*public void request(int protocol, int version, JObject obj, Action<String> respon,bool subscribe = false)
  * {
  *  request(protocol.ToString(), "1", obj, respon, subscribe);
  * }*/
 public void request(protocol _protocol, JObject obj, Action <JObject> respon, bool subscribe = false)
 {
     request((int)_protocol, obj, respon, subscribe);
 }
示例#7
0
文件: FTNN.cs 项目: dominwong4/FTNN
 public void pustCallback(protocol _protocol, Action <JObject> respon, int uid)
 {
 }
示例#8
0
 var(protocol, host, path) = redirectComponents;
示例#9
0
 /// <summary>
 /// Invoked when <see cref="ToEntity"/> operation is about to return.
 /// </summary>
 /// <param name="entity"><see cref="protocol"/> converted from <see cref="protocolDto"/>.</param>
 static partial void OnEntity(this protocolDto dto, protocol entity);
示例#10
0
 static extern uint SCardConnect(IntPtr context, String reader, share ShareMode, protocol PreferredProtocols, out IntPtr cardHandle, out protocol ActiveProtocol);
示例#11
0
 /// <summary>
 /// Invoked when <see cref="ToDTO"/> operation is about to return.
 /// </summary>
 /// <param name="dto"><see cref="protocolDto"/> converted from <see cref="protocol"/>.</param>
 static partial void OnDTO(this protocol entity, protocolDto dto);
示例#12
0
文件: FTNN.cs 项目: dominwong4/FTNN
 //return uid
 public string pustCallback(protocol _protocol, JObject obj, Action <JObject> respon)
 {
     return(pustCallback(((int)_protocol).ToString(), obj, respon));
 }
示例#13
0
 static extern uint SCardConnect(IntPtr context, String reader, share ShareMode, protocol PreferredProtocols, out IntPtr cardHandle, out protocol ActiveProtocol);
示例#14
0
        public string AddProtocol(ref OperationResult pobjOperationResult, protocolDto pobjProtocol, List <protocolcomponentDto> pobjProtocolComponent, List <string> ClientSession)
        {
            //mon.IsActive = true;
            string NewId0 = null;

            try
            {
                SigesoftEntitiesModel dbContext = new SigesoftEntitiesModel();
                protocol objEntity = protocolAssembler.ToEntity(pobjProtocol);

                int intNodeId = 9;

                if (pobjProtocol.v_ProtocolId == null)
                {
                    objEntity.d_InsertDate   = DateTime.Now;
                    objEntity.i_InsertUserId = Int32.Parse(ClientSession[2]);
                    objEntity.i_IsDeleted    = 0;
                    // Autogeneramos el Pk de la tabla

                    NewId0 = Common.Utils.GetNewId(intNodeId, Utils.GetNextSecuentialId(intNodeId, 20), "PR");
                    objEntity.v_ProtocolId = NewId0;

                    dbContext.AddToprotocol(objEntity);
                    dbContext.SaveChanges();
                }
                else
                {
                    // Obtener la entidad fuente
                    var objEntitySource = (from a in dbContext.protocol
                                           where a.v_ProtocolId == pobjProtocol.v_ProtocolId
                                           select a).FirstOrDefault();

                    // Crear la entidad con los datos actualizados
                    pobjProtocol.i_IsDeleted    = 0;
                    pobjProtocol.d_UpdateDate   = DateTime.Now;
                    pobjProtocol.i_UpdateUserId = Int32.Parse(ClientSession[2]);

                    var objStrongEntity = protocolAssembler.ToEntity(pobjProtocol);

                    // Copiar los valores desde la entidad actualizada a la Entidad Fuente
                    dbContext.protocol.ApplyCurrentValues(objStrongEntity);
                }

                // Grabar detalle del protocolo
                foreach (var item in pobjProtocolComponent)
                {
                    protocolcomponent objEntity1 = protocolcomponentAssembler.ToEntity(item);

                    objEntity1.d_InsertDate   = DateTime.Now;
                    objEntity1.i_InsertUserId = Int32.Parse(ClientSession[2]);
                    objEntity1.i_IsDeleted    = 0;

                    var NewId1 = Common.Utils.GetNewId(intNodeId, Utils.GetNextSecuentialId(intNodeId, 21), "PC");
                    objEntity1.v_ProtocolComponentId = NewId1;
                    objEntity1.v_ProtocolId          = pobjProtocol.v_ProtocolId == null ? NewId0 : pobjProtocol.v_ProtocolId;

                    dbContext.AddToprotocolcomponent(objEntity1);
                    dbContext.SaveChanges();
                }

                pobjOperationResult.Success = 1;
            }
            catch (Exception ex)
            {
                pobjOperationResult.Success          = 0;
                pobjOperationResult.ExceptionMessage = Common.Utils.ExceptionFormatter(ex);
                // Llenar entidad Log
            }

            return(NewId0);
        }
示例#15
0
 : this() => RemoteServer = new NetUri(protocol, hostname, port);
示例#16
0
 public bool Connect(String reader, share ShareMode, protocol PreferredProtocols)
 {
     protocol activeProtocol;
     uint ris = SCardConnect(context, reader, ShareMode, PreferredProtocols, out cardHandle, out activeProtocol);
     if (ris != 0)
         return false;
     return true;
 }
示例#17
0
 new WSEndpoint(_communicator, transport, protocol, options, oaEndpoint, endpointString),
示例#18
0
 public SendingServiceUnavailableEventArgs(protocol.Base.StanzaWithError stanza)
     : base()
 {
     Stanza = stanza;
 }
示例#19
0
        private void JabberClient_OnSASLEnd(Object sender, protocol.stream.Features feat)
        {
            lock (StateLock)
            {
                State = BindState.Instance;
            }
            if (feat["bind", URI.BIND] != null)
            {
                IQ iq = new IQ(Document) {Type = IQType.Set};

                protocol.stream.Bind bind = new protocol.stream.Bind(Document);
                if (!string.IsNullOrEmpty(Resource))
                    bind.Resource = Resource;

                iq.AddChild(bind);
                Tracker.BeginIQ(iq, GotResource, feat);
            }
            else if (feat["session", URI.SESSION] != null)
            {
                IQ iq = new IQ(Document) {Type = IQType.Set};
                iq.AddChild(new protocol.stream.Session(Document));
                Tracker.BeginIQ(iq, GotSession, feat);
            }
            else
                IsAuthenticated = true;
        }
示例#20
0
 : Get(protocol, protocol.disk(), size, "Disk");