private void bomFindButton_Click(object sender, EventArgs e) { BomDataSet set = bomSet; bookmark.Get(); AppHelper.ResetGridDataSource(bomGrid); if (bomDateCheck.Checked == true) { set.From = bomFromDateEdit.Value.ToString(AppRes.csDateFormat); set.To = bomToDateEdit.Value.ToString(AppRes.csDateFormat); } else { set.From = ""; set.To = ""; } set.AreaNo = (EReportArea)bomAreaCombo.SelectedValue; set.FName = bomNameEdit.Text.Trim(); set.Select(); AppHelper.SetGridDataSource(bomGrid, set); bookmark.Goto(); bomGrid.Focus(); }
private void Initialize() { bomSet = new BomDataSet(AppRes.DB.Connect, null, null); productSet = new ProductDataSet(AppRes.DB.Connect, null, null); partSet = new PartDataSet(AppRes.DB.Connect, null, null); phyMainSet = new PhysicalMainDataSet(AppRes.DB.Connect, null, null); cheMainSet = new ChemicalMainDataSet(AppRes.DB.Connect, null, null); phyQuery = new PhysicalQuery(true); cheQuery = new ChemicalQuery(true); bomRec = new BomColumns(); bookmark = new GridBookmark(bomGridView); AppHelper.SetGridEvenRow(bomGridView); AppHelper.SetGridEvenRow(productGridView); AppHelper.SetGridEvenRow(partGridView); bomAreaColumn.DisplayFormat.FormatType = FormatType.Custom; bomAreaColumn.DisplayFormat.Format = new ReportAreaFormat(); bomRegTimeColumn.DisplayFormat.FormatType = FormatType.Custom; bomRegTimeColumn.DisplayFormat.Format = new ReportDateTimeFormat(); bomAreaCombo.DataSource = EnumHelper.GetNameValues <EReportArea>(); bomAreaCombo.DisplayMember = "Name"; bomAreaCombo.ValueMember = "Value"; }