private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { String orden = ""; String Nombre = ""; String Numero = ""; String Modelo = ""; if (e.RowIndex >= 0) { DataGridViewRow row = this.dataGridView1.Rows[e.RowIndex]; orden = row.Cells["Orden"].Value.ToString(); Nombre = row.Cells["Nombre"].Value.ToString(); Numero = row.Cells["Numero"].Value.ToString(); Modelo = row.Cells["Modelo"].Value.ToString(); } datosrevision datos = new datosrevision(); string firstfour = orden.Substring(0, 2); datos.tipopedido = firstfour; datos.orden = orden; datos.txtnombre.Text = Nombre; datos.txtnumero.Text = Numero; datos.txtmodelo.Text = Modelo; datos.Show(); }
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { String orden = ""; String Nombre = ""; String Numero = ""; String Modelo = ""; String Descripcion = ""; String Fecha = ""; String id = ""; String Contras = ""; if (e.RowIndex >= 0) { DataGridViewRow row = this.dataGridView1.Rows[e.RowIndex]; orden = row.Cells["Orden"].Value.ToString(); Nombre = row.Cells["Nombre"].Value.ToString(); Numero = row.Cells["Numero"].Value.ToString(); Modelo = row.Cells["Modelo"].Value.ToString(); Descripcion = row.Cells["Descripcion"].Value.ToString(); Fecha = row.Cells["Fecha y hora"].Value.ToString(); id = row.Cells["ID"].Value.ToString(); Contras = row.Cells["Contraseña"].Value.ToString(); } datosrevision datos = new datosrevision(); string firstfour = orden.Substring(0, 2); datos.tipopedido = firstfour; datos.orden = orden; datos.txtnombre.Text = Nombre; datos.txtnumero.Text = Numero; datos.txtmodelo.Text = Modelo; datos.txtdescri.Text = Descripcion; datos.fechafin = Fecha; datos.ID = id; datos.Contrasena = Contras; datos.Show(); }
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { String orden = ""; String Nombre = ""; String Numero = ""; String Modelo = ""; String cant = ""; String cant2 = ""; String cant3 = ""; String cant4 = ""; String cant5 = ""; String descri = ""; String descri2 = ""; String descri3 = ""; String descri4 = ""; String descri5 = ""; String impor = ""; String impor2 = ""; String impor3 = ""; String impor4 = ""; String impor5 = ""; String Abono = ""; String Abono2 = ""; String Abono3 = ""; String Abono4 = ""; String Abono5 = ""; String total = ""; String Restante = ""; String fechayhora = ""; String fechayhora2 = ""; String fechayhora3 = ""; String fechayhora4 = ""; String fechayhora5 = ""; if (e.RowIndex >= 0) { DataGridViewRow row = this.dataGridView1.Rows[e.RowIndex]; orden = row.Cells["Orden"].Value.ToString(); Nombre = row.Cells["Nombre"].Value.ToString(); Numero = row.Cells["Numero"].Value.ToString(); Modelo = row.Cells["Modelo"].Value.ToString(); cant = row.Cells["Cantidad"].Value.ToString(); cant2 = row.Cells["Cantidad2"].Value.ToString(); cant3 = row.Cells["Cantidad3"].Value.ToString(); cant4 = row.Cells["Cantidad4"].Value.ToString(); cant5 = row.Cells["Cantidad5"].Value.ToString(); descri = row.Cells["Descripcion"].Value.ToString(); descri2 = row.Cells["Descripcion2"].Value.ToString(); descri3 = row.Cells["Descripcion3"].Value.ToString(); descri4 = row.Cells["Descripcion4"].Value.ToString(); descri5 = row.Cells["Descripcion5"].Value.ToString(); fechayhora = row.Cells["Fecha y hora"].Value.ToString(); fechayhora2 = row.Cells["Fecha y hora2"].Value.ToString(); fechayhora3 = row.Cells["Fecha y hora3"].Value.ToString(); fechayhora4 = row.Cells["Fecha y hora4"].Value.ToString(); fechayhora5 = row.Cells["Fecha y hora5"].Value.ToString(); impor = row.Cells["Importe"].Value.ToString(); impor2 = row.Cells["Importe2"].Value.ToString(); impor3 = row.Cells["Importe3"].Value.ToString(); impor4 = row.Cells["Importe4"].Value.ToString(); impor5 = row.Cells["Importe5"].Value.ToString(); Abono = row.Cells["Abono"].Value.ToString(); Abono2 = row.Cells["Abono2"].Value.ToString(); Abono3 = row.Cells["Abono3"].Value.ToString(); Abono4 = row.Cells["Abono4"].Value.ToString(); Abono5 = row.Cells["Abono5"].Value.ToString(); total = row.Cells["Total"].Value.ToString(); Restante = row.Cells["Restante"].Value.ToString(); } if (Abono != "" && Abono2 == "" && Abono3 == "" && Abono4 == "" && Abono5 == "") { datosrevision Abonos = new datosrevision(); /* Abonos.cant = cant; * Abonos.descri = descri; * Abonos.impor = impor;*/ Abonos.cant = cant; Abonos.cant2 = cant2; Abonos.cant3 = cant3; Abonos.cant4 = cant4; Abonos.cant5 = cant5; Abonos.descri = descri; Abonos.descri2 = descri2; Abonos.descri3 = descri3; Abonos.descri4 = descri4; Abonos.descri5 = descri5; Abonos.impor = impor; Abonos.impor2 = impor2; Abonos.impor3 = impor3; Abonos.impor4 = impor4; Abonos.impor5 = impor5; Abonos.Abono = Abono; Abonos.total = total; Abonos.Restante = Restante; Abonos.fechayhora = fechayhora; Abonos.Nombre = Nombre; Abonos.txtnombre.Text = Nombre; Abonos.Modelo = Modelo; Abonos.orden = orden; Abonos.Numero = Numero; Abonos.txtnumero.Text = Numero; Abonos.txtmodelo.Text = Modelo; string firstfour = orden.Substring(0, 2); Abonos.tipopedido = firstfour; Abonos.Show(); } else if (Abono != "" && Abono2 != "" && Abono3 == "" && Abono4 == "" && Abono5 == "") { datosrevision Abonos = new datosrevision(); Abonos.cant = cant; Abonos.cant2 = cant2; Abonos.cant3 = cant3; Abonos.cant4 = cant4; Abonos.cant5 = cant5; Abonos.descri = descri; Abonos.descri2 = descri2; Abonos.descri3 = descri3; Abonos.descri4 = descri4; Abonos.descri5 = descri5; //Abonos.txttotal.Text = total; Abonos.impor = impor; Abonos.impor2 = impor2; Abonos.impor3 = impor3; Abonos.impor4 = impor4; Abonos.impor5 = impor5; /* Abonos.cant = cant; * Abonos.descri = descri; * Abonos.impor = impor;*/ Abonos.Abono = Abono; Abonos.fechayhora = fechayhora; Abonos.Abono2 = Abono2; Abonos.fechayhora2 = fechayhora2; Abonos.total = total; Abonos.Restante = Restante; Abonos.txtnombre.Text = Nombre; Abonos.Nombre = Nombre; Abonos.Modelo = Modelo; Abonos.orden = orden; Abonos.Numero = Numero; Abonos.txtnumero.Text = Numero; Abonos.txtmodelo.Text = Modelo; //String Abonosin = Abono.Replace("$", ""); //String Abonosin2 = Abono2.Replace("$", ""); // String Abonosin3 = Abono3.Replace("$", ""); //String Abonosin4 = Abono4.Replace("$", ""); Abonos.Show(); } else if (Abono != "" && Abono2 != "" && Abono3 != "" && Abono4 == "" && Abono5 == "") { datosrevision Abonos = new datosrevision(); Abonos.cant = cant; Abonos.cant2 = cant2; Abonos.cant3 = cant3; Abonos.cant4 = cant4; Abonos.cant5 = cant5; Abonos.descri = descri; Abonos.descri2 = descri2; Abonos.descri3 = descri3; Abonos.descri4 = descri4; Abonos.descri5 = descri5; //Abonos.txttotal.Text = total; Abonos.impor = impor; Abonos.impor2 = impor2; Abonos.impor3 = impor3; Abonos.impor4 = impor4; Abonos.impor5 = impor5; /* Abonos.cant = cant; * Abonos.descri = descri; * Abonos.impor = impor;*/ Abonos.Abono = Abono; Abonos.fechayhora = fechayhora; Abonos.txtnombre.Text = Nombre; Abonos.Abono2 = Abono2; Abonos.fechayhora2 = fechayhora2; Abonos.Abono3 = Abono3; Abonos.fechayhora3 = fechayhora3; Abonos.total = total; Abonos.Restante = Restante; Abonos.Numero = Numero; Abonos.txtnumero.Text = Numero; Abonos.txtmodelo.Text = Modelo; Abonos.Nombre = Nombre; Abonos.Modelo = Modelo; Abonos.orden = orden; Abonos.Show(); } else if (Abono != "" && Abono2 != "" && Abono3 != "" && Abono4 != "" && Abono5 == "") { datosrevision Abonos = new datosrevision(); Abonos.cant = cant; Abonos.cant2 = cant2; Abonos.cant3 = cant3; Abonos.cant4 = cant4; Abonos.cant5 = cant5; Abonos.descri = descri; Abonos.descri2 = descri2; Abonos.descri3 = descri3; Abonos.descri4 = descri4; Abonos.descri5 = descri5; Abonos.impor = impor; Abonos.impor2 = impor2; Abonos.impor3 = impor3; Abonos.impor4 = impor4; Abonos.impor5 = impor5; Abonos.Abono = Abono; Abonos.fechayhora = fechayhora; Abonos.Abono2 = Abono2; Abonos.fechayhora2 = fechayhora2; Abonos.txtnombre.Text = Nombre; Abonos.Abono3 = Abono3; Abonos.fechayhora3 = fechayhora3; Abonos.Abono4 = Abono4; Abonos.fechayhora4 = fechayhora4; Abonos.total = total; Abonos.Restante = Restante; Abonos.Numero = Numero; Abonos.txtnumero.Text = Numero; Abonos.txtmodelo.Text = Modelo; Abonos.Nombre = Nombre; Abonos.Modelo = Modelo; Abonos.orden = orden; Abonos.Show(); } else if (Abono != "" && Abono2 != "" && Abono3 != "" && Abono4 != "" && Abono5 != "") { datosrevision Abonos = new datosrevision(); Abonos.cant = cant; Abonos.cant2 = cant2; Abonos.cant3 = cant3; Abonos.cant4 = cant4; Abonos.cant5 = cant5; Abonos.descri = descri; Abonos.descri2 = descri2; Abonos.descri3 = descri3; Abonos.descri4 = descri4; Abonos.descri5 = descri5; //Abonos.txttotal.Text = total; Abonos.impor = impor; Abonos.impor2 = impor2; Abonos.impor3 = impor3; Abonos.impor4 = impor4; Abonos.impor5 = impor5; /* Abonos.cant = cant; * Abonos.descri = descri; * Abonos.impor = impor;*/ Abonos.Abono = Abono; Abonos.fechayhora = fechayhora; Abonos.Abono2 = Abono2; Abonos.fechayhora2 = fechayhora2; Abonos.Abono3 = Abono3; Abonos.fechayhora3 = fechayhora3; Abonos.txtnombre.Text = Nombre; Abonos.Abono4 = Abono4; Abonos.fechayhora4 = fechayhora4; Abonos.Abono5 = Abono5; Abonos.fechayhora5 = fechayhora5; Abonos.Numero = Numero; Abonos.txtnumero.Text = Numero; Abonos.txtmodelo.Text = Modelo; Abonos.total = total; Abonos.Restante = Restante; Abonos.Nombre = Nombre; Abonos.Modelo = Modelo; Abonos.orden = orden; Abonos.Show(); } /* datosrevision datos = new datosrevision(); * * * * //datos.tipopedido = firstfour; * datos.orden = orden; * datos.txtnombre.Text = Nombre; * datos.txtnumero.Text = Numero; * datos.txtmodelo.Text = Modelo; * * datos.Show();*/ }