private void LoadData() { try { this.Cursor = Cursors.WaitCursor; bdSource.EndEdit(); criteria = new RPT002_WorkPlaceAir_Criteria() { ANALYSYS_NO = txtReportNumber.TextValue, JOB_NO = txtJobNo.TextValue, ANALYTICAL_DATE_FROM = dtMeasuredDate.DateValue, ANALYTICAL_DATE_TO = dtMeasuredDateTo.DateValue, CUSTOMER_ID = txtCustomer.IntValue, SAMPING_BY = txtMeasuredBy.StringValue, SHOW_DELETE_RECORD = chkShowDeleteRecord.Checked, }; rptList = vmRpt.GetWorkPlaceAir(criteria); gvResult.DataSource = rptList; gvResult.SetRowDeletedStyle((int)eCol.DEL_ID); if (gvResult.RowCount > 0) { this.ToolBarSwitch = "1212111221"; //this.ToolBarSwitch = "1212121221"; } else { this.ToolBarSwitch = "1212001221"; } } catch (Exception ex) { rMessageBox.ShowException(this, ex); } finally { this.Cursor = Cursors.Default; } }
public RPT002_WorkPlaceAirQualityEntry() { InitializeComponent(); wpaResult = vmRpt.GetWorkPlaceAir(0); mode = ScreenMode.Add; }