示例#1
0
        public bool actualizarCuota(DTO_Cuota dto)
        {
            double   monto  = Convert.ToDouble(dto.Monto);
            DateTime inicio = Convert.ToDateTime(dto.FechaInicio);
            DateTime fin    = Convert.ToDateTime(dto.FechaFin);
            int      nro    = Convert.ToInt32(dto.NroCuota);

            return(daoCuota.actualizarCuota(nro, monto, inicio, fin));
        }
示例#2
0
        public DTO_Cuota getDtoCuota(Cuota cuota)
        {
            DTO_Cuota dto = new DTO_Cuota();

            dto.NroCuota    = cuota.NroCuota.ToString();
            dto.FechaPago   = cuota.FechaPago.Date.ToShortDateString();
            dto.FechaInicio = cuota.FechaInicio.Date.ToShortDateString();
            dto.FechaFin    = cuota.FechaFin.Date.Date.ToShortDateString();
            dto.Monto       = cuota.Monto.ToString();
            dto.Estado      = cuota.getEstado();
            return(dto);
        }
示例#3
0
 private void frm_detalle_cuota_Load(object sender, EventArgs e)
 {
     seleccionado = service.getUltimaCuota(cod);
     if (seleccionado != null)
     {
         dtp_fecha_inicio.Value = Convert.ToDateTime(seleccionado.FechaInicio.ToString());
         dtp_fecha_vto.Value    = Convert.ToDateTime(seleccionado.FechaFin.ToString());
         txt_monto.Text         = seleccionado.Monto;
     }
     else
     {
         dtp_fecha_inicio.Value = DateTime.Now;
         dtp_fecha_vto.Value    = DateTime.Now;
         txt_monto.Text         = "N/D";
     }
 }
示例#4
0
 private void btn_guardar_Click(object sender, EventArgs e)
 {
     if (dtp_fecha_inicio.Value != null && dtp_fecha_vto.Value != null && !String.IsNullOrWhiteSpace(txt_monto.Text) && Support.GetSupport().esUnNumero(txt_monto.Text) == true)
     {
         DTO_Cuota nuevo = new DTO_Cuota();
         nuevo.FechaInicio = dtp_fecha_inicio.Value.ToString();
         nuevo.FechaFin    = dtp_fecha_vto.Value.ToString();
         nuevo.Monto       = txt_monto.Text;
         nuevo.NroCuota    = seleccionado.NroCuota;
         bool respuesta = service.actualizarCuota(nuevo);
         if (respuesta == true)
         {
             IForm frm_p = principal as IForm;
             frm_p.actualizarDatos();
             MessageBox.Show("Cuota modificado con exito", "Exito", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
         else
         {
             MessageBox.Show("Error al modificar la cuota", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
 }