internal override void SetFocus() { if (owner.IsHandleCreated && owner.CanFocus) { owner.Focus(); } }
internal override void SetFocus() { if (owner.CanFocus) { owner.Focus(); } }
public override void Select(AccessibleSelection flags) { if (Owner == null) { throw new InvalidOperationException(SR.DataGridViewCellAccessibleObject_OwnerNotSet); } DataGridViewRowHeaderCell dataGridViewCell = (DataGridViewRowHeaderCell)Owner; DataGridView dataGridView = dataGridViewCell.DataGridView; if (dataGridView == null) { return; } if ((flags & AccessibleSelection.TakeFocus) == AccessibleSelection.TakeFocus) { dataGridView.Focus(); } if (dataGridViewCell.OwningRow != null && (dataGridView.SelectionMode == DataGridViewSelectionMode.FullRowSelect || dataGridView.SelectionMode == DataGridViewSelectionMode.RowHeaderSelect)) { if ((flags & (AccessibleSelection.TakeSelection | AccessibleSelection.AddSelection)) != 0) { dataGridViewCell.OwningRow.Selected = true; } else if ((flags & AccessibleSelection.RemoveSelection) == AccessibleSelection.RemoveSelection) { dataGridViewCell.OwningRow.Selected = false; } } }
private void RefrescarData() { int Col = 0, Ren = 0; if (dgvDatos.SelectedCells.Count > 0) { DataGridViewCell Cell = dgvDatos.SelectedCells[0]; Col = Cell.ColumnIndex; Ren = Cell.RowIndex; ActualizarData(); dgvDatos.CurrentCell = dgvDatos[Col, Ren]; dgvDatos.Focus(); } }
/// <summary> /// 行一致离开 /// </summary> /// <param name="dataGridView"></param> /// <returns></returns> private static bool RowIdentical(DataGridView dataGridView) { //add by dwq 2015-05-27 先提交最后一次输入DataGridView的数据 if (dataGridView.IsCurrentCellDirty) { dataGridView.CommitEdit(DataGridViewDataErrorContexts.Commit); } List<object> objListNull = new List<object>(); List<object> objListNotNull = new List<object>(); foreach (DataGridViewRow row in dataGridView.Rows) { if (!row.IsNewRow) { for (int i = 0; i < row.Cells.Count; i++) { if (row.Cells[i].Value == null || row.Cells[i].Value.ToString().Trim() == string.Empty) { objListNull.Add(row.Cells[i].Value); } else { objListNotNull.Add(row.Cells[i].Value); } } } if (objListNull.Count != 0 && objListNotNull.Count != 0) { TipForm tip = new TipForm(dataGridView, "请完整填写当前表格整行数据"); tip.Show(); if (!dataGridView.Parent.Focused) { dataGridView.Parent.Focus(); } dataGridView.Focus(); //Form frm = UtilClass.SearchOwner(dataGridView) as Form; //frm.Activate(); foreach (DataGridViewCell item in row.Cells) { if (item.Value == null) { dataGridView.Focus(); dataGridView.CurrentCell = item; } } return false; } } return true; }
/// <summary> /// 行一致离开 /// </summary> /// <param name="dataGridView"></param> /// <returns></returns> public bool RowIdentical(DataGridView dataGridView) { //dataGridView.CommitEdit(DataGridViewDataErrorContexts.Commit); List<object> objListNull = new List<object>(); List<object> objListNotNull = new List<object>(); foreach (DataGridViewRow row in dataGridView.Rows) { if (!row.IsNewRow) { for (int i = 0; i < row.Cells.Count; i++) { if (row.Cells[i].Value == null || row.Cells[i].Value.ToString().Trim() == string.Empty) { objListNull.Add(row.Cells[i].Value); } else { objListNotNull.Add(row.Cells[i].Value); } } } if (objListNull.Count != 0 && objListNotNull.Count != 0) { MessageBox.Show("未完成数据表格数据,请完成数据或清空。"); foreach (DataGridViewCell item in row.Cells) { if (item.Value == null) { dataGridView.Focus(); dataGridView.CurrentCell = item; } } return false; } } return true; }
//DataInfo /// <summary> /// Create short information about selected article /// </summary> /// <param name="grid1">Table of cheque</param> /// <param name="grid2">Table of all articles</param> /// <returns>Return short information about selected article. If no selected article it's return empty string.</returns> public static string ShowArticleInfo(DataGridView grid1, DataGridView grid2) { string id = ""; string name = ""; string price = ""; string unit = ""; string bc = ""; if (!grid1.Focused && !grid2.Focused) grid2.Focus(); if (grid1.Focused && grid1.Rows.Count != 0 && grid1.SelectedRows.Count != 0) { id = grid1.SelectedRows[0].Cells["ID"].Value.ToString(); name = grid1.SelectedRows[0].Cells["NAME"].Value.ToString(); price = grid1.SelectedRows[0].Cells["PRICE"].Value.ToString(); unit = grid1.SelectedRows[0].Cells["UNIT"].Value.ToString(); bc = grid1.SelectedRows[0].Cells["BC"].Value.ToString(); return id + " " + name + " : Ціна " + price + " за 1" + unit + " Штрих-код : " + bc; } if (grid2.Focused && grid2.Rows.Count != 0 && grid2.SelectedRows.Count != 0) { id = grid2.SelectedRows[0].Cells["ID"].Value.ToString(); name = grid2.SelectedRows[0].Cells["NAME"].Value.ToString(); price = grid2.SelectedRows[0].Cells["PRICE"].Value.ToString(); unit = grid2.SelectedRows[0].Cells["UNIT"].Value.ToString(); bc = grid2.SelectedRows[0].Cells["BC"].Value.ToString(); return id + " " + name + " : Ціна " + price + " за 1" + unit + " Штрих-код : " + bc; } return ""; }
public static void poner_combobox(BindingSource bs, DataGridView dgv, string celda) { DataRowView view = (DataRowView)bs.Current; dgv.Rows[dgv.Rows.Count - 1].Cells[celda].Value = view["id"].ToString(); dgv.Focus(); }
// el Bs de persona, el bs del elemento a tratar, el dgv del elemento a tratar // el maximo del id de el elemento a tratar // el elemnto donde quiro pararme al adicionar un elemento(nombre) // el nombre del id que tiene el dgv a tratar(id) // el nombre q tiene id id perosna en la tabla especifica public static void inserta_persona(BindingSource persona, BindingSource bs, DataGridView dgv, int max, string nombre, string id, string id_detalle) { if (dgv.Rows.Count > 0) dgv.CurrentCell = dgv.CurrentRow.Cells[nombre]; if (max >= 10000) max = max + 1; else max = Convert.ToInt32(Convert.ToString(mia.id_centro) + "0001"); bs.AddNew(); dgv.Rows[dgv.Rows.Count - 1].Cells[id].Value = max; dgv.CurrentCell = dgv.CurrentRow.Cells[nombre]; DataRowView view = (DataRowView)persona.Current; dgv.Rows[dgv.Rows.Count - 1].Cells[id_detalle].Value = view["id"].ToString(); dgv.Focus(); }
/// <summary> /// METODO DE VALIDACION DE LA GRILLA /// </summary> /// <param name="grilla">datagrid view</param> /// <param name="tex">mesaje</param> /// <returns></returns> private bool validaErrorDGV(DataGridView grilla,string tex) { if (grilla.Rows.Count==0) { epValida.SetError(grilla, tex); grilla.Focus(); return false; } else { epValida.Clear(); return true; } }
private void dataGridView_Pedidos_Click(object sender, EventArgs e) { #region Creando controles this.panel1 = new System.Windows.Forms.Panel(); this.lbl_ClienteD = new System.Windows.Forms.Label(); this.txt_ClienteD = new System.Windows.Forms.TextBox(); this.dataGridView_Historial = new System.Windows.Forms.DataGridView(); this.Id_PedidoD = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Id_ClienteD = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Id_ProductoD = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.ProductoD = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.CantidadD = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.bttn_Entregarpedido_Cliente = new System.Windows.Forms.Button(); this.bttn_Cancelarpedido_Cliente = new System.Windows.Forms.Button(); this.bttn_CerrarPanel = new System.Windows.Forms.Button(); this.panel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView_Historial)).BeginInit(); this.SuspendLayout(); #endregion #region Dando diseño a los controles // // panel1 // this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.panel1.Controls.Add(this.bttn_CerrarPanel); this.panel1.Controls.Add(this.bttn_Cancelarpedido_Cliente); this.panel1.Controls.Add(this.bttn_Entregarpedido_Cliente); this.panel1.Controls.Add(this.dataGridView_Historial); this.panel1.Controls.Add(this.txt_ClienteD); this.panel1.Controls.Add(this.lbl_ClienteD); this.panel1.Location = new System.Drawing.Point(188, 172); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(486, 355); this.panel1.TabIndex = 0; this.panel1.BringToFront(); // // lbl_ClienteD // this.lbl_ClienteD.AutoSize = true; this.lbl_ClienteD.Location = new System.Drawing.Point(3, 11); this.lbl_ClienteD.Name = "lbl_ClienteD"; this.lbl_ClienteD.Size = new System.Drawing.Size(42, 13); this.lbl_ClienteD.TabIndex = 0; this.lbl_ClienteD.Text = "Cliente:"; // // txt_ClienteD // this.txt_ClienteD.Enabled = false; this.txt_ClienteD.Location = new System.Drawing.Point(51, 4); this.txt_ClienteD.Name = "txt_ClienteD"; this.txt_ClienteD.Size = new System.Drawing.Size(225, 20); this.txt_ClienteD.TabIndex = 1; // // dataGridView_Historial // this.dataGridView_Historial.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.dataGridView_Historial.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; this.dataGridView_Historial.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dataGridView_Historial.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.Id_PedidoD, this.Id_ClienteD, this.Id_ProductoD, this.ProductoD, this.CantidadD}); //this.UnidadD}); this.dataGridView_Historial.Cursor = System.Windows.Forms.Cursors.Hand; this.dataGridView_Historial.Location = new System.Drawing.Point(6, 44); this.dataGridView_Historial.Name = "dataGridView_Historial"; this.dataGridView_Historial.Size = new System.Drawing.Size(470, 264); this.dataGridView_Historial.TabIndex = 2; //this.dataGridView_Historial.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGridView_Historial_MouseDoubleClick); // // Id_PedidoD // this.Id_PedidoD.HeaderText = "Id_Pedido"; this.Id_PedidoD.Name = "Id_PedidoD"; this.Id_PedidoD.Visible = false; // // Id_ClienteD // this.Id_ClienteD.HeaderText = "Id_ClienteD"; this.Id_ClienteD.Name = "Id_ClienteD"; this.Id_ClienteD.Visible = false; // // Id_ProductoD // this.Id_ProductoD.HeaderText = "Id_Producto"; this.Id_ProductoD.Name = "Id_ProductoD"; this.Id_ProductoD.Visible = false; // // ProductoD // this.ProductoD.HeaderText = "Producto"; this.ProductoD.Name = "ProductoD"; // // CantidadD // this.CantidadD.HeaderText = "Cantidad"; this.CantidadD.Name = "CantidadD"; // // bttn_Entregarpedido_Cliente // this.bttn_Entregarpedido_Cliente.Location = new System.Drawing.Point(19, 319); this.bttn_Entregarpedido_Cliente.Name = "bttn_Entregarpedido_Cliente"; this.bttn_Entregarpedido_Cliente.Size = new System.Drawing.Size(105, 23); this.bttn_Entregarpedido_Cliente.TabIndex = 4; this.bttn_Entregarpedido_Cliente.Text = "Entregar pedido"; this.bttn_Entregarpedido_Cliente.UseVisualStyleBackColor = true; this.bttn_Entregarpedido_Cliente.Click += new System.EventHandler(this.bttn_Entregarpedido_Cliente_Click); // // bttn_Cancelarpedido_Cliente // this.bttn_Cancelarpedido_Cliente.BackColor = System.Drawing.Color.Red; this.bttn_Cancelarpedido_Cliente.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.bttn_Cancelarpedido_Cliente.ForeColor = System.Drawing.Color.White; this.bttn_Cancelarpedido_Cliente.Location = new System.Drawing.Point(343, 319); this.bttn_Cancelarpedido_Cliente.Name = "bttn_Cancelarpedido_Cliente"; this.bttn_Cancelarpedido_Cliente.Size = new System.Drawing.Size(117, 23); this.bttn_Cancelarpedido_Cliente.TabIndex = 5; this.bttn_Cancelarpedido_Cliente.Text = "Cancelar pedido"; this.bttn_Cancelarpedido_Cliente.UseVisualStyleBackColor = false; this.bttn_Cancelarpedido_Cliente.Click += new System.EventHandler(this.bttn_Cancelarpedido_Cliente_Click); // // bttn_CerrarPanel // this.bttn_CerrarPanel.BackColor = System.Drawing.Color.Red; this.bttn_CerrarPanel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.bttn_CerrarPanel.ForeColor = System.Drawing.Color.White; this.bttn_CerrarPanel.Location = new System.Drawing.Point(453, 1); this.bttn_CerrarPanel.Name = "bttn_CerrarPanel"; this.bttn_CerrarPanel.Size = new System.Drawing.Size(23, 23); this.bttn_CerrarPanel.TabIndex = 3; this.bttn_CerrarPanel.Text = "X"; this.bttn_CerrarPanel.UseVisualStyleBackColor = false; this.bttn_CerrarPanel.Click += new System.EventHandler(this.bttn_CerrarPanel_Click); #endregion #region Agreando panel al control this.Controls.Add(this.panel1); #endregion #region Llenando datos idpend = Convert.ToInt32(dataGridView_Pedidos.CurrentRow.Cells["Id_Pedido"].Value); LLenando_PedidosClientesDetalle(); try { panel_PedidoClientes.Dispose(); // Libero de la memoria el panel de pedido para quitarlo Controls.Remove(panel_PedidoClientes); // Quito el control de la ventana Control_Historial_Clientes(); // Vuelvo a crear el control con el fin de que aparesca en la parte de atras dataGridView_Historial.Focus(); } catch (Exception) { //En caso de ocurrir un error omite la instrucción throw; } #endregion }
private void dataGridView_PedidosPROVEEDORES_Click(object sender, EventArgs e) { #region Creando controles this.panel2 = new System.Windows.Forms.Panel(); this.bttn_Cancelarpedido_Provedor = new System.Windows.Forms.Button(); this.bttn_Entregarpedido_Proveedor = new System.Windows.Forms.Button(); this.bttn_CerrarPanelProv = new System.Windows.Forms.Button(); this.dataGridView_HistorialProveedor = new System.Windows.Forms.DataGridView(); this.txt_Proved = new System.Windows.Forms.TextBox(); this.lbl_Proved = new System.Windows.Forms.Label(); this.Id_CompraP = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Id_Proveedor = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Id_ProductoP = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.ProductoP = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.CantidadP = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.UnidadP = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.panel2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView_HistorialProveedor)).BeginInit(); this.SuspendLayout(); #endregion #region Dando diseño a los controles // // panel2 // this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.panel2.Controls.Add(this.bttn_Cancelarpedido_Provedor); this.panel2.Controls.Add(this.bttn_Entregarpedido_Proveedor); this.panel2.Controls.Add(this.bttn_CerrarPanelProv); this.panel2.Controls.Add(this.dataGridView_HistorialProveedor); this.panel2.Controls.Add(this.txt_Proved); this.panel2.Controls.Add(this.lbl_Proved); this.panel2.Location = new System.Drawing.Point(188, 172); this.panel2.Name = "panel2"; this.panel2.Size = new System.Drawing.Size(486, 355); this.panel2.TabIndex = 0; // // bttn_Cancelarpedido_Provedor // this.bttn_Cancelarpedido_Provedor.BackColor = System.Drawing.Color.Red; this.bttn_Cancelarpedido_Provedor.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.bttn_Cancelarpedido_Provedor.ForeColor = System.Drawing.Color.White; this.bttn_Cancelarpedido_Provedor.Location = new System.Drawing.Point(343, 319); this.bttn_Cancelarpedido_Provedor.Name = "bttn_Cancelarpedido_Provedor"; this.bttn_Cancelarpedido_Provedor.Size = new System.Drawing.Size(117, 23); this.bttn_Cancelarpedido_Provedor.TabIndex = 5; this.bttn_Cancelarpedido_Provedor.Text = "Cancelar pedido"; this.bttn_Cancelarpedido_Provedor.UseVisualStyleBackColor = false; this.bttn_Cancelarpedido_Provedor.Click += new System.EventHandler(this.bttn_Cancelarpedido_Proveedor_Click); // // bttn_Entregarpedido_Proveedor // this.bttn_Entregarpedido_Proveedor.Location = new System.Drawing.Point(19, 319); this.bttn_Entregarpedido_Proveedor.Name = "bttn_Entregarpedido_Proveedor"; this.bttn_Entregarpedido_Proveedor.Size = new System.Drawing.Size(105, 23); this.bttn_Entregarpedido_Proveedor.TabIndex = 4; this.bttn_Entregarpedido_Proveedor.Text = "Entregar pedido"; this.bttn_Entregarpedido_Proveedor.UseVisualStyleBackColor = true; this.bttn_Entregarpedido_Proveedor.Click += new System.EventHandler(bttn_Entregarpedido_Proveedor_Click); // // bttn_CerrarPanelProv // this.bttn_CerrarPanelProv.BackColor = System.Drawing.Color.Red; this.bttn_CerrarPanelProv.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.bttn_CerrarPanelProv.ForeColor = System.Drawing.Color.White; this.bttn_CerrarPanelProv.Location = new System.Drawing.Point(453, 1); this.bttn_CerrarPanelProv.Name = "bttn_CerrarPanelProv"; this.bttn_CerrarPanelProv.Size = new System.Drawing.Size(23, 23); this.bttn_CerrarPanelProv.TabIndex = 3; this.bttn_CerrarPanelProv.Text = "X"; this.bttn_CerrarPanelProv.UseVisualStyleBackColor = false; this.bttn_CerrarPanelProv.Click += new System.EventHandler(this.bttn_CerrarPanelP_Click); // // dataGridView_HistorialProveedor // this.dataGridView_HistorialProveedor.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.dataGridView_HistorialProveedor.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; this.dataGridView_HistorialProveedor.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dataGridView_HistorialProveedor.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.Id_CompraP, this.Id_Proveedor, this.Id_ProductoP, this.ProductoP, this.CantidadP}); this.dataGridView_HistorialProveedor.Cursor = System.Windows.Forms.Cursors.Hand; this.dataGridView_HistorialProveedor.Location = new System.Drawing.Point(6, 44); this.dataGridView_HistorialProveedor.Name = "dataGridView_HistorialProveedor"; this.dataGridView_HistorialProveedor.Size = new System.Drawing.Size(470, 269); this.dataGridView_HistorialProveedor.TabIndex = 2; //this.dataGridView_HistorialProveedor.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.dataGridView_Historial_MouseDoubleClick); // // txt_Proved // this.txt_Proved.Enabled = false; this.txt_Proved.Location = new System.Drawing.Point(68, 8); this.txt_Proved.Name = "txt_Proved"; this.txt_Proved.Size = new System.Drawing.Size(225, 20); this.txt_Proved.TabIndex = 1; // // lbl_Proved // this.lbl_Proved.AutoSize = true; this.lbl_Proved.Location = new System.Drawing.Point(3, 11); this.lbl_Proved.Name = "lbl_Proved"; this.lbl_Proved.Size = new System.Drawing.Size(59, 13); this.lbl_Proved.TabIndex = 0; this.lbl_Proved.Text = "Proveedor:"; // // Id_CompraP // this.Id_CompraP.HeaderText = "Id_Compra"; this.Id_CompraP.Name = "Id_CompraP"; this.Id_CompraP.Visible = false; // // Id_Proveedor // this.Id_Proveedor.HeaderText = "Id_Proveedor"; this.Id_Proveedor.Name = "Id_Proveedor"; this.Id_Proveedor.Visible = false; // // Id_ProductoP // this.Id_ProductoP.HeaderText = "Id_Producto"; this.Id_ProductoP.Name = "Id_ProductoP"; this.Id_ProductoP.Visible = false; // // ProductoP // this.ProductoP.HeaderText = "Producto"; this.ProductoP.Name = "ProductoP"; // // CantidadP // this.CantidadP.HeaderText = "Cantidad"; this.CantidadP.Name = "CantidadP"; // // UnidadP // this.UnidadP.HeaderText = "Unidad"; this.UnidadP.Name = "UnidadP"; #endregion #region Agregando el panel al control this.Controls.Add(this.panel2); #endregion #region Llenando datos idcomp = Convert.ToInt32(dataGridView_PedidosPROVEEDORES.CurrentRow.Cells["Id_PedidoProveedor"].Value); LLenando_PedidosProveedoresDetalle(); try { panel_PedidoProveedores.Dispose(); // Libero de la memoria el panel de pedido para quitarlo Controls.Remove(panel_PedidoProveedores); // Quito el control de la ventana Control_Historial_Proveedores(); // Vuelvo a crear el control con el fin de que aparesca en la parte de atras dataGridView_HistorialProveedor.Focus(); } catch (Exception) { //En caso de ocurrir un error omite la instrucción } #endregion }
private void Control_Historial_Proveedores() { #region Creando controles para el panl de historial de proveedores this.panel_PedidoProveedores = new System.Windows.Forms.Panel(); this.lbl_PedidoProveedores = new System.Windows.Forms.Label(); this.bttn_CerrarPanelPROVEEDORES = new System.Windows.Forms.Button(); this.dataGridView_PedidosPROVEEDORES = new System.Windows.Forms.DataGridView(); this.Id_PedidoProveedor = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Id_ProveedorP = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Proveedor = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Fecha_PedidoProveedor = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.panel_PedidoProveedores.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView_PedidosPROVEEDORES)).BeginInit(); this.SuspendLayout(); #endregion #region Agregando diseño para el panel de historial de proveedores // // panel_PedidoProveedores // this.panel_PedidoProveedores.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.panel_PedidoProveedores.Controls.Add(this.lbl_PedidoProveedores); this.panel_PedidoProveedores.Controls.Add(this.bttn_CerrarPanelPROVEEDORES); this.panel_PedidoProveedores.Controls.Add(this.dataGridView_PedidosPROVEEDORES); this.panel_PedidoProveedores.Location = new System.Drawing.Point(100, 174); this.panel_PedidoProveedores.Name = "panel_PedidoProveedores"; this.panel_PedidoProveedores.Size = new System.Drawing.Size(719, 387); this.panel_PedidoProveedores.TabIndex = 1; // // lbl_PedidoProveedores // this.lbl_PedidoProveedores.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left))); this.lbl_PedidoProveedores.AutoSize = true; this.lbl_PedidoProveedores.Location = new System.Drawing.Point(269, 9); this.lbl_PedidoProveedores.Name = "lbl_PedidoProveedores"; this.lbl_PedidoProveedores.Size = new System.Drawing.Size(209, 13); this.lbl_PedidoProveedores.TabIndex = 5; this.lbl_PedidoProveedores.Text = "LISTA DE PEDIDOS DE PROVEEDORES"; this.lbl_PedidoProveedores.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // // bttn_CerrarPanelPROVEEDORES // this.bttn_CerrarPanelPROVEEDORES.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Right))); this.bttn_CerrarPanelPROVEEDORES.BackColor = System.Drawing.Color.Red; this.bttn_CerrarPanelPROVEEDORES.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.bttn_CerrarPanelPROVEEDORES.ForeColor = System.Drawing.Color.White; this.bttn_CerrarPanelPROVEEDORES.Location = new System.Drawing.Point(690, 3); this.bttn_CerrarPanelPROVEEDORES.MaximumSize = new System.Drawing.Size(23, 23); this.bttn_CerrarPanelPROVEEDORES.MinimumSize = new System.Drawing.Size(23, 23); this.bttn_CerrarPanelPROVEEDORES.Name = "bttn_CerrarPanelPROVEEDORES"; this.bttn_CerrarPanelPROVEEDORES.Size = new System.Drawing.Size(23, 23); this.bttn_CerrarPanelPROVEEDORES.TabIndex = 4; this.bttn_CerrarPanelPROVEEDORES.Text = "X"; this.bttn_CerrarPanelPROVEEDORES.UseVisualStyleBackColor = false; this.bttn_CerrarPanelPROVEEDORES.Click += new System.EventHandler(this.bttn_CerrarPanelPROVEEDORES_Click); // // dataGridView_PedidosPROVEEDORES // this.dataGridView_PedidosPROVEEDORES.AllowUserToAddRows = false; this.dataGridView_PedidosPROVEEDORES.AllowUserToDeleteRows = false; this.dataGridView_PedidosPROVEEDORES.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.dataGridView_PedidosPROVEEDORES.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; this.dataGridView_PedidosPROVEEDORES.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dataGridView_PedidosPROVEEDORES.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.Id_PedidoProveedor, this.Id_ProveedorP, this.Proveedor, this.Fecha_PedidoProveedor}); this.dataGridView_PedidosPROVEEDORES.Location = new System.Drawing.Point(3, 32); this.dataGridView_PedidosPROVEEDORES.Name = "dataGridView_PedidosPROVEEDORES"; this.dataGridView_PedidosPROVEEDORES.ReadOnly = true; this.dataGridView_PedidosPROVEEDORES.Size = new System.Drawing.Size(712, 350); this.dataGridView_PedidosPROVEEDORES.TabIndex = 1; this.dataGridView_PedidosPROVEEDORES.Click += new EventHandler(dataGridView_PedidosPROVEEDORES_Click); // // Id_PedidoProveedor // this.Id_PedidoProveedor.HeaderText = "Id_Pedido"; this.Id_PedidoProveedor.Name = "Id_PedidoProveedor"; this.Id_PedidoProveedor.ReadOnly = true; this.Id_PedidoProveedor.Visible = false; // // Id_ProveedorP // this.Id_ProveedorP.HeaderText = "Id_Proveedor"; this.Id_ProveedorP.Name = "Id_ProveedorP"; this.Id_ProveedorP.ReadOnly = true; this.Id_ProveedorP.Visible = false; // // Proveedor // this.Proveedor.HeaderText = "Proveedor"; this.Proveedor.Name = "Proveedor"; this.Proveedor.ReadOnly = true; // // Fecha_PedidoProveedor // this.Fecha_PedidoProveedor.HeaderText = "Fecha Pedido"; this.Fecha_PedidoProveedor.Name = "Fecha_PedidoProveedor"; this.Fecha_PedidoProveedor.ReadOnly = true; // // MENU PRINCIPAL // this.Controls.Add(this.panel_PedidoProveedores); #endregion LLenando_PedidosProveedores(); dataGridView_PedidosPROVEEDORES.Focus(); }