コード例 #1
0
ファイル: frmRegistrador.cs プロジェクト: MathiasIvan/SC
        private void btnAceptar_Click(object sender, EventArgs e)
        {
            var r = ObtenerDatosFormulario();

            if (alternativa == "Agregar")
            {
                Registrador.AgregarRegistrador(r);
            }

            else if (alternativa == "Actualizar")
            {
                if (this.lstRegistrador.SelectedItems.Count == 0)
                {
                    MessageBox.Show("Seleccione una fila para Actualizar.");
                }

                else
                {
                    int indice = lstRegistrador.SelectedIndex;
                    Registrador.ActualizarRegistrador(r, indice);
                    ActualizarListaRegistradores();
                }
            }

            LimpiarFormulario();
            ActualizarListaRegistradores();
            BloquearFormulario();
        }
コード例 #2
0
        private void ExecuteFactoryEvent(object pObject)
        {
            try
            {
                if (pObject.GetType() == typeof(SS_StopSimplesResposta))
                {
                    SS_StopSimplesResposta _SS_StopSimplesResposta = (SS_StopSimplesResposta)(pObject);
                    Registrador.SendMDSEventFactory(_SS_StopSimplesResposta);
                }

                if (pObject.GetType() == typeof(RS_RespostaStop))
                {
                    RS_RespostaStop _RS_RespostaStop = (RS_RespostaStop)(pObject);
                    Registrador.SendMDSEventFactory(_RS_RespostaStop);
                }

                if (pObject.GetType() == typeof(CR_CancelamentoStopResposta))
                {
                    CR_CancelamentoStopResposta _CR_CancelamentoStopResposta = (CR_CancelamentoStopResposta)(pObject);
                    Registrador.SendMDSEventFactory(_CR_CancelamentoStopResposta);
                }
            }
            catch (Exception ex)
            {
                WriteEventLog(string.Format("{0}{1}", "ExecuteFactoryEvent: ", ex.Message));
                throw ex;
            }
        }
コード例 #3
0
        public bool ConsulteSiExisteUltimaVersion(string url)
        {
            bool existe = false;

            string[] datosUrl    = url.Split('/');
            string   usuario     = datosUrl[3];
            string   repositorio = datosUrl[4];

            Commit[]           losCommits = Construya(ObtengaInformacionRepositorio(usuario, repositorio, 0), usuario, repositorio);
            RepositoriosClient cliente    = new RepositoriosClient();

            try
            {
                existe = cliente.ValideSiSeDebeAnalizar(losCommits);
            }
            catch (Exception laExcepcion)
            {
                Registrador elRegistrador = new Registrador();
                elRegistrador.Registre(laExcepcion, "0", Componentes.WebService);
            }
            finally
            {
                cliente.Close();
            }

            return(existe);
        }
コード例 #4
0
ファイル: frmRegistrador.cs プロジェクト: MathiasIvan/SC
        private Registrador ObtenerDatosFormulario()
        {
            Registrador registrador = new Registrador();

            registrador.ID_Registrador = txtCodRegistrador.Text;
            registrador.Nombre         = txtNombreRegistrador.Text;
            registrador.Direccion      = txtDireccionRegistrador.Text;
            registrador.Telefono       = txtTelefonoRegistrador.Text;
            registrador.NroDocumento   = txtNroDocumentoRegistrador.Text;
            registrador.Observacion    = txtObservacionRegistrador.Text;

            return(registrador);
        }
コード例 #5
0
        private void frmReserva_Load(object sender, EventArgs e)
        {
            ActualizarListaReservas();

            cboHabitacionReserva.DataSource  = Habitacion.ObtenerHabitaciones();
            cboClienteReserva.DataSource     = Cliente.ObtenerClientes();
            cboRegistradorReserva.DataSource = Registrador.ObtenerRegistradores();

            cboHabitacionReserva.SelectedItem  = null;
            cboClienteReserva.SelectedItem     = null;
            cboRegistradorReserva.SelectedItem = null;

            BloquearFormulario();
        }
コード例 #6
0
ファイル: frmRegistrador.cs プロジェクト: MathiasIvan/SC
        private void lstRegistrador_SelectedIndexChanged(object sender, EventArgs e)
        {
            Registrador r = (Registrador)lstRegistrador.SelectedItem;

            if (r != null)
            {
                txtCodRegistrador.Text          = r.ID_Registrador;
                txtNombreRegistrador.Text       = r.Nombre;
                txtDireccionRegistrador.Text    = r.Direccion;
                txtTelefonoRegistrador.Text     = r.Telefono;
                txtNroDocumentoRegistrador.Text = r.NroDocumento;
                txtObservacionRegistrador.Text  = r.Observacion;
            }
        }
コード例 #7
0
ファイル: frmRegistrador.cs プロジェクト: MathiasIvan/SC
        private void btnEliminar_Click(object sender, EventArgs e)
        {
            if (this.lstRegistrador.SelectedItems.Count == 0)
            {
                MessageBox.Show("Seleccione una fila para eliminar");
            }

            else
            {
                Registrador r = (Registrador)lstRegistrador.SelectedItem;
                Registrador.EliminarRegistrador(r);
                ActualizarListaRegistradores();
                LimpiarFormulario();
            }
        }
コード例 #8
0
        private void lstReserva_Click(object sender, EventArgs e)
        {
            Reserva rs = (Reserva)lstReserva.SelectedItem;

            if (rs != null)
            {
                txtCodReserva.Text = rs.ID_Reserva.ToString();
                dtpFechaHoraEntradaReserva.MinDate = rs.FechaHoraEntrada;
                dtpFechaHoraSalidaReserva.MinDate  = rs.FechaHoraSalida;
                cboClienteReserva.SelectedItem     = (Cliente)Cliente.ObtenerCliente(rs._Cliente.ID_Cliente);
                cboHabitacionReserva.SelectedItem  = (Habitacion)Habitacion.ObtenerHabitacion(rs._Habitacion.ID_Habitacion);
                cboRegistradorReserva.SelectedItem = (Registrador)Registrador.ObtenerRegistrador(rs._Registrador.ID_Registrador);
                txtCostoTotalReserva.Text          = rs.CostoTotal.ToString();
                txtObservacionReserva.Text         = rs.Observacion;
            }
        }
コード例 #9
0
        private Task <IReadOnlyList <GitHubCommit> > ObtengaInformacionRepositorio(string usuario, string repositorio, int IdPaquete)
        {
            Task <IReadOnlyList <GitHubCommit> > commits = null;

            try {
                GitHubClient github = new GitHubClient(new ProductHeaderValue("RP2BAcceso"));
                github.Connection.Credentials = new Credentials("AnalisisRepositorioR2BP", "rastaloca123");
                commits = github.Repository.Commit.GetAll(usuario, repositorio);
                commits.Wait();
            } catch (Exception laExcepcion) {
                Registrador elRegistrador = new Registrador();
                elRegistrador.Registre(laExcepcion, IdPaquete.ToString(), Componentes.AnalizadorRepositorio);
            }

            return(commits);
        }
コード例 #10
0
        private Registrador ObtenerDatosFormulario()
        {
            Registrador registrador = new Registrador();

            if (!string.IsNullOrEmpty(txtCodRegistrador.Text))
            {
                registrador.ID_Registrador = Convert.ToInt32(txtCodRegistrador.Text);
            }

            registrador.Nombre       = txtNombreRegistrador.Text;
            registrador.Direccion    = txtDireccionRegistrador.Text;
            registrador.Telefono     = txtTelefonoRegistrador.Text;
            registrador.NroDocumento = txtNroDocumentoRegistrador.Text;
            registrador.Observacion  = txtObservacionRegistrador.Text;

            return(registrador);
        }
コード例 #11
0
        public List <Herencia> Construya(BaseListSyntax laListaDeHerencias, string IdSolucion)
        {
            List <Herencia> lasHerencias = new List <Herencia>();

            if (laListaDeHerencias != null)
            {
                foreach (BaseTypeSyntax type in laListaDeHerencias.Types)
                {
                    try
                    {
                        Herencia laHerencia = new Herencia();
                        laHerencia.DeclaracionHerencia = type.ToString();
                        lasHerencias.Add(laHerencia);
                    }
                    catch (Exception laExcepcion) {
                        Registrador elRegistrador = new Registrador();
                        elRegistrador.Registre(laExcepcion, IdSolucion, Componentes.AnalizadorCodigoFuente);
                    }
                }
            }

            return(lasHerencias);
        }
コード例 #12
0
        public void Consulte(int IdPaquete, string url)
        {
            string[] datosUrl    = url.Split('/');
            string   usuario     = datosUrl[3];
            string   repositorio = datosUrl[4];

            Commit[]           losCommits = Construya(ObtengaInformacionRepositorio(usuario, repositorio, IdPaquete), usuario, repositorio);
            RepositoriosClient cliente    = new RepositoriosClient();

            try
            {
                cliente.GuardeElRepositorio(losCommits, IdPaquete);
            }
            catch (Exception laExcepcion)
            {
                Registrador elRegistrador = new Registrador();
                elRegistrador.Registre(laExcepcion, IdPaquete.ToString(), Componentes.WebService);
            }
            finally
            {
                cliente.Close();
            }
        }
コード例 #13
0
ファイル: Bitacoras.cs プロジェクト: gimlim1/analizadorR
        public void RegistreError(Bitacora laBitacora)
        {
            Registrador elRegistrador = new Registrador();

            elRegistrador.Registre(laBitacora);
        }
コード例 #14
0
ファイル: Repositorios.cs プロジェクト: gimlim1/analizadorR
        public void GuardeElRepositorio(Commit[] losCommits, int idPaquete)
        {
            Registrador elRegistrador = new Registrador();

            elRegistrador.Registre(idPaquete, losCommits);
        }
コード例 #15
0
        public int GuardeElPaquete(Paquete elPaquete)
        {
            Registrador elRegistrador = new Registrador();

            return(elRegistrador.Registre(elPaquete));
        }
コード例 #16
0
ファイル: frmRegistrador.cs プロジェクト: MathiasIvan/SC
 private void ActualizarListaRegistradores()
 {
     lstRegistrador.DataSource = null;
     lstRegistrador.DataSource = Registrador.ObtenerRegistradores();
 }