private void BtnNew_Click(object sender, EventArgs e) { frmWorkOrder frm = new frmWorkOrder(); frm.flag = true; OpenFormPanel(frm); }
private void BtnGW_Click(object sender, EventArgs e) { panel3.Visible = true; panel4.Visible = true; btnStore.Visible = true; btnTool.Visible = true; frmWorkOrder fm = new frmWorkOrder(); OpenFormPanel(fm); }
private void BtnModify_Click(object sender, EventArgs e) { frmWorkOrder frm = new frmWorkOrder(); if (dgvSearch.SelectedRows.Count > 0) { if (dgvSearch.CurrentRow.Cells[0].Value == null) { frmMessageBoxInvalidData frm3 = new frmMessageBoxInvalidData(); frm3.ShowDialog(); } else { frm.txtCodeWorkOrder.Enabled = false; frm.btnEliminarItem.Enabled = false; frm.btnAddMaterial.Enabled = false; frm.btnAddTool.Enabled = false; frm.txtDesc.Enabled = false; frm.dtpFin.Enabled = false; frm.dtpInicio.Enabled = false; frm.dgvSearchClient.Enabled = false; frm.dgvItem.Enabled = false; frm.flag = false; frm.txtCodeWorkOrder.Text = dgvSearch.CurrentRow.Cells[0].Value.ToString(); frm.txtDesc.Text = dgvSearch.CurrentRow.Cells[1].Value.ToString(); /* * frm.btnNew.Enabled = false; * frm.btnDelete.Enabled = true; * frm.txtId.Text = dgvSearch.CurrentRow.Cells[0].Value.ToString(); * frm.txtName.Text = dgvSearch.CurrentRow.Cells[1].Value.ToString(); * * frm.txtAddress.Text = dgvSearch.CurrentRow.Cells[2].Value.ToString(); * //Los combo box se rellenan diferente asi no * //frm.cboCity.SelectedValue = dgvSearch.CurrentRow.Cells[3].Value.ToString(); * * frm.txtPhone.Text = dgvSearch.CurrentRow.Cells[4].Value.ToString(); */ OpenFormPanel(frm); } } else { frmMessageBoxSelectRow frm2 = new frmMessageBoxSelectRow(); frm2.ShowDialog(); } }
private void btnAddMaterial_Click(object sender, EventArgs e) { if (dgvSearch.SelectedRows.Count > 0) { if (dgvSearch.CurrentRow.Cells[0].Value == null) { frmMessageBoxInvalidData frm3 = new frmMessageBoxInvalidData(); frm3.ShowDialog(); } else { frmWorkOrder fm = Owner as frmWorkOrder; //se rellena el grip con magia :v this.Close(); } } else { frmMessageBoxSelectRow frm2 = new frmMessageBoxSelectRow(); frm2.ShowDialog(); } }