private void gxTxtNameStyle_KeyDown(object sender, KeyEventArgs e) { try { Cursor = Cursors.WaitCursor; frmBusStyle frm = new frmBusStyle(); frm.IdClient = Convert.ToInt32(cboClient.EditValue); frm.ShowDialog(); if (frm._Be != null) { int index = gvCommimentDetail.FocusedRowHandle; gvCommimentDetail.SetRowCellValue(index, "IdStyle", frm._Be.IdStyle); gvCommimentDetail.SetRowCellValue(index, "NameStyle", frm._Be.NameStyle); gvCommimentDetail.SetRowCellValue(index, "Description", frm._Be.Description); gvCommimentDetail.FocusedColumn = gvCommimentDetail.Columns["Quantity"]; } Cursor = Cursors.Default; } catch (Exception ex) { Cursor = Cursors.Default; XtraMessageBox.Show(ex.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void gvProgramProductionDetail_RowCellClick(object sender, RowCellClickEventArgs e) { if (e.Column.Caption == "Style") { try { Cursor = Cursors.WaitCursor; frmBusStyle frm = new frmBusStyle(); frm.IdClient = Convert.ToInt32(cboClient.EditValue); frm.IdClientDepartment = Convert.ToInt32(cboDivision.EditValue); frm.ShowDialog(); if (frm._Be != null) { int index = gvProgramProductionDetail.FocusedRowHandle; IdStyle = frm._Be.IdStyle; NameStyle = frm._Be.NameStyle; Description = frm._Be.Description; gvProgramProductionDetail.SetRowCellValue(index, "IdStyle", IdStyle); gvProgramProductionDetail.SetRowCellValue(index, "NameStyle", NameStyle); gvProgramProductionDetail.SetRowCellValue(index, "Description", Description); gvProgramProductionDetail.FocusedColumn = gvProgramProductionDetail.Columns["Item"]; } Cursor = Cursors.Default; } catch (Exception ex) { Cursor = Cursors.Default; XtraMessageBox.Show(ex.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error); } } }
private void btnBusStyle_Click(object sender, EventArgs e) { try { Cursor = Cursors.WaitCursor; frmBusStyle frm = new frmBusStyle(); frm.IdClient = Convert.ToInt32(cboClient.EditValue); frm.IdClientDepartment = 0; frm.ShowDialog(); if (frm._Be != null) { intIdStyle = frm._Be.IdStyle; txtNameStyle.Text = frm._Be.NameStyle; txtDescription.Text = frm._Be.Description; } Cursor = Cursors.Default; } catch (Exception ex) { Cursor = Cursors.Default; XtraMessageBox.Show(ex.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error); } }