public PhysicalQuery(bool local = false) { this.local = local; if (local == true) { MainSet = new PhysicalMainDataSet(AppRes.DB.Connect, null, null); ImageSet = new PhysicalImageDataSet(AppRes.DB.Connect, null, null); P2Set = new PhysicalP2DataSet(AppRes.DB.Connect, null, null); P3Set = new PhysicalP3DataSet(AppRes.DB.Connect, null, null); P40Set = new PhysicalP40DataSet(AppRes.DB.Connect, null, null); P41Set = new PhysicalP41DataSet(AppRes.DB.Connect, null, null); P5Set = new PhysicalP5DataSet(AppRes.DB.Connect, null, null); ProfJobSet = new ProfJobDataSet(AppRes.DB.Connect, null, null); CtrlUs = null; CtrlEu = null; } else { productSet = new ProductDataSet(AppRes.DB.Connect, null, null); } }
private void Initialize() { phyCheckSet = new PhysicalMainDataSet(AppRes.DB.Connect, null, null); phyMainSet = new PhysicalMainDataSet(AppRes.DB.Connect, null, null); phyImageSet = new PhysicalImageDataSet(AppRes.DB.Connect, null, null); phyP2Set = new PhysicalP2DataSet(AppRes.DB.Connect, null, null); phyP3Set = new PhysicalP3DataSet(AppRes.DB.Connect, null, null); phyP40Set = new PhysicalP40DataSet(AppRes.DB.Connect, null, null); phyP41Set = new PhysicalP41DataSet(AppRes.DB.Connect, null, null); phyP5Set = new PhysicalP5DataSet(AppRes.DB.Connect, null, null); phyReportSet = new PhysicalReportDataSet(AppRes.DB.Connect, null, null); profJobSet = new ProfJobDataSet(AppRes.DB.Connect, null, null); ctrlUs = new CtrlEditPhysicalUs(); ctrlUs.MainSet = phyMainSet; ctrlUs.ImageSet = phyImageSet; ctrlUs.P2Set = phyP2Set; ctrlUs.P3Set = phyP3Set; ctrlUs.P4Set = phyP41Set; ctrlUs.P5Set = phyP5Set; ctrlEu = new CtrlEditPhysicalEu(); ctrlEu.MainSet = phyMainSet; ctrlEu.ImageSet = phyImageSet; ctrlEu.P2Set = phyP2Set; ctrlEu.P3Set = phyP3Set; ctrlEu.P40Set = phyP40Set; ctrlEu.P41Set = phyP41Set; ctrlEu.P5Set = phyP5Set; phyQuery = new PhysicalQuery(); phyQuery.MainSet = phyMainSet; phyQuery.ImageSet = phyImageSet; phyQuery.P2Set = phyP2Set; phyQuery.P3Set = phyP3Set; phyQuery.P40Set = phyP40Set; phyQuery.P41Set = phyP41Set; phyQuery.P5Set = phyP5Set; phyQuery.ProfJobSet = profJobSet; phyQuery.CtrlUs = ctrlUs; phyQuery.CtrlEu = ctrlEu; bookmark = new GridBookmark(physicalGridView); AppHelper.SetGridEvenRow(physicalGridView); physicalAreaColumn.DisplayFormat.FormatType = FormatType.Custom; physicalAreaColumn.DisplayFormat.Format = new ReportAreaFormat(); physicalRegTimeColumn.DisplayFormat.FormatType = FormatType.Custom; physicalRegTimeColumn.DisplayFormat.Format = new ReportDateTimeFormat(); approvalCombo.DataSource = EnumHelper.GetNameValues <EReportApproval>(); approvalCombo.DisplayMember = "Name"; approvalCombo.ValueMember = "Value"; areaCombo.DataSource = EnumHelper.GetNameValues <EReportArea>(); areaCombo.DisplayMember = "Name"; areaCombo.ValueMember = "Value"; SetControl(null); }