//Calcula las fechas de los pagos private void button3_Click(object sender, EventArgs e) { FechasPago mes; mes = new FechasPago(); mes.Fecha = DateTime.ParseExact(dateTimePicker3.Text, "dd/MM/yyyy", null); List <FechasPago> Listado = new List <FechasPago>(); asesor.Pedido.LosPagos = Listado; asesor.Pedido.Meses = Convert.ToInt32(numericUpDown1.Value); for (Int16 j = 0; j < numericUpDown1.Value; j++) { mes = mes + 30; FechasPago elPago = new FechasPago(mes.Fecha.Year, mes.Fecha.Month, mes.Fecha.Day); asesor.Pedido.LosPagos.Add(elPago); listBox1.Items.Add(elPago.Fecha.ToString()); } asesor.Pedido.Porcentaje = Convert.ToDouble(textBox8.Text); FechasPago pivote = new FechasPago(); asesor.Pedido.Entrega = new FechasPago(); asesor.Pedido.Entrega.Fecha = DateTime.ParseExact(dateTimePicker3.Text, "dd/MM/yyyy", null); try { Prestamo(asesor); } catch (Exception ex) { MessageBox.Show("" + ex); throw; } }
public Dependiente() { DateTime NowTime = DateTime.Now; fechaSistema = new FechasPago(); fechaSistema.Fecha = new DateTime(NowTime.Year, NowTime.Month, NowTime.Day); //Metodo Para obtener Caja DataSet ds = new DataSet(); List <SqlParameter> lista = new List <SqlParameter>(); lista.Add(new SqlParameter("@Opcion", SqlDbType.Int) { Value = 1 }); ds = manager.GetData("spCaja", lista.ToArray()); if (ds.Tables[0].Rows.Count > 0) { capital = Convert.ToDouble(ds.Tables[0].Rows[0][1]); limite = Convert.ToDouble(ds.Tables[0].Rows[0][2]); } Console.WriteLine(capital + " " + limite); modo = 'T'; //Todos los datos por default }
public Dependiente() { DateTime NowTime = DateTime.Now; fechaSistema = new FechasPago(); fechaSistema.Fecha = new DateTime(NowTime.Year, NowTime.Month, NowTime.Day); capital = 10000000; limite = 100000; modo = 'T'; //Todos los datos por default }
//Verifica con el controlador la fecha de autorizacion private void button2_Click(object sender, EventArgs e) { FechasPago author = new FechasPago(); author.Fecha = DateTime.ParseExact(dateTimePicker2.Text, "dd/MM/yyyy", null); //MessageBox.Show(asesor.Pedido.Registro.Fecha.ToString() + "; " + author.Fecha.ToString()+"; "+asesor.Pedido.Edo); asesor.Pedido.Author = author; if (asesor.Pedido.Edo != 'N') { MessageBox.Show("Error en la fecha de autorizacion."); } else { numericUpDown1.Enabled = true; textBox8.Enabled = true; textBox9.Enabled = true; button3.Enabled = true; dateTimePicker3.Enabled = true; FechasPago entrega = new FechasPago(); entrega.Fecha = DateTime.ParseExact(dateTimePicker2.Text, "dd/MM/yyyy", null); entrega = entrega + 7; dateTimePicker3.Value = entrega.Fecha; CalculatePay(); } }