/// <summary> /// 데이터 그리드 바인딩 /// </summary> private void DataGridViewBinding1() { try { dgv1.DataSource = null; WorkOrderDSService service = new WorkOrderDSService(); dgv1.DataSource = service.GetWorkOrder(); } catch (Exception err) { this.Log.WriteError($"[[RECV {this.Name}]]:{err.Message}"); } }
private void dgv1_CellClick(object sender, DataGridViewCellEventArgs e) { try { if (e.RowIndex < 0) { return; } string code = dgv1.Rows[e.RowIndex].Cells[5].Value.ToString(); string id = dgv1.Rows[e.RowIndex].Cells[2].Value.ToString(); dgv2.DataSource = null; WorkOrderDSService service = new WorkOrderDSService(); dgv2.DataSource = service.GetWorkOrder2(code, id); } catch (Exception err) { this.Log.WriteError($"[[RECV {this.Name}]]:{err.Message}"); } }
public void Search(object sender, EventArgs e) { try { if (((FrmMAIN)this.MdiParent).ActiveMdiChild == this) { string day1 = sday.Value.ToShortDateString(); string day2 = eday.Value.ToShortDateString(); string item = ITEMNAME.Text; string id = WORKORDER.Text; string name = FACILITY.Text; WorkOrderDSService service = new WorkOrderDSService(); dgv1.DataSource = service.SP_GetWorkOrder(day1, day2, id, item, name); } } catch (Exception err) { this.Log.WriteError($"[[RECV {this.Name}]]:{err.Message}"); } }