Exemple #1
0
        private void dgvSS_DoubleClick(object sender, EventArgs e)
        {
            if (dgvSS.CurrentRow.Index != -1)
            {
                BR.SeguridadSocial other = seguridadController.GetSocial(Convert.ToInt32(dgvSS.CurrentRow.Cells["id"].Value), true);
                var conductor            = conductoresController.MostarConductor(other.id_conductor);

                cmbConductor.Text = (conductor.cedula + " " + conductor.nombre.Trim() + " " + conductor.apellido.Trim());
                dtpfinal.Value    = other.pago_siguiente;
                dtpInicio.Value   = other.pago_anterior;
                txtValor.Text     = other.valor.ToString();
            }
            else
            {
                MessageBox.Show("Seleccione un registro");
            }
        }
Exemple #2
0
        public bool Crear(EN.SeguridadSocial other, string cedula)
        {
            bool resultado = false;

            try
            {
                //Mapeo de EN BR
                BR.SeguridadSocial ss = new BR.SeguridadSocial(conductoresController.MostarIdConductor(cedula), other.pago_anterior, other.pago_siguiente, other.valor);
                //Inserte en la bd
                db.SeguridadSocial.Add(ss);
                db.SaveChanges();
                resultado = true;
            }
            catch (Exception)
            {
                throw;
            }
            return(resultado);
        }