private void dgvDatos_DoubleClickCell(object sender, Infragistics.Win.UltraWinGrid.DoubleClickCellEventArgs e) { try { SDK.Documentos.frmTransferencia forulario = new SDK.Documentos.frmTransferencia(4); forulario.txtNumero.Text = Convert.ToInt32(dgvDatos.ActiveRow.Cells[0].Value).ToString(); forulario.IsSolicitud = true; forulario.MdiParent = this.MdiParent; var kea = new KeyPressEventArgs(Convert.ToChar(13)); forulario.txtNumero_KeyPress(sender, kea); forulario.Show(); } catch (Exception) { } }
public SDK_Configuracion_Transferencias(decimal _idDocumento, SDK.Documentos.frmTransferencia form) { tbl_Lines = new DataTable(); tbl_Items = new DataTable(); tbl_Almacenes = new DataTable(); IdDocumento = _idDocumento; Form_Traspaso = form; #region Autocompletables using (SqlConnection connection = new SqlConnection(Datos.Clases.Constantes.conectionLog)) { using (SqlCommand command = new SqlCommand("sp_SDKDataSource", connection)) { command.CommandType = CommandType.StoredProcedure; command.Parameters.AddWithValue("@TipoConsulta", 8); SqlDataAdapter da = new SqlDataAdapter(); da.SelectCommand = command; da.Fill(tbl_Items); _rate = (from item in tbl_Items.AsEnumerable() select item.Field <decimal>("Rate")).FirstOrDefault(); Form_Traspaso.ultraDropDown1.SetDataBinding(tbl_Items, null); Form_Traspaso.ultraDropDown1.ValueMember = "ItemCode"; Form_Traspaso.ultraDropDown1.DisplayMember = "ItemCode"; } } #endregion #region Autocompletables using (SqlConnection connection = new SqlConnection(Datos.Clases.Constantes.conectionLog)) { using (SqlCommand command = new SqlCommand("sp_SDKDataSource", connection)) { command.CommandType = CommandType.StoredProcedure; command.Parameters.AddWithValue("@TipoConsulta", 10); SqlDataAdapter da = new SqlDataAdapter(); da.SelectCommand = command; da.Fill(tbl_Almacenes); } } #endregion }
private void dgvDatos_DoubleClickRow(object sender, Infragistics.Win.UltraWinGrid.DoubleClickRowEventArgs e) { try { SDK.Documentos.frmTransferencia formulario = new SDK.Documentos.frmTransferencia(4); formulario.MdiParent = this.MdiParent; formulario.txtNumero.Text = e.Row.Cells[0].Value.ToString(); formulario.Text = "Solicitud de traslado (Preeliminar)"; var kea = new KeyPressEventArgs(Convert.ToChar(13)); formulario.txtNumero_KeyPress(sender, kea); if (formulario.ShowDialog() == System.Windows.Forms.DialogResult.Cancel) { btnBuscar_Click(sender, e); } } catch (Exception) { } }