public AddPOLYSSP(string sampleName, string materialNo, bool IsShowSampleID) { InitializeComponent(); btYes.Click += btYes_Click; btNO.Click += btNO_Click; dateProdDate.DateTime = DateTime.Now; this.cbHasChart.Checked = true; //if (!IsShowSampleID) //{ // this.txtSampleID.Enabled = false; cmbLine.SelectedValueChanged += eventSetSampleID; dateProdDate.DateTimeChanged += eventSetSampleID; // } // else // { this.txtSampleID.Enabled = true; // } SampleName = sampleName; MaterialNo = materialNo; #region Language try { CultureLanuage.ApplyResourcesFrom(this, "QC21", "AddPOLYSSP"); } catch (Exception ex) { Console.WriteLine(ex); MessageBox.Show("Translate error:" + ex.Message); } #endregion }
public SerchPlanView() { InitializeComponent(); #region language try { DataSet dsgrid = CultureLanuage.ApplyResourcesFrom(this, "QC07", this.Name); DataTable gridData = CultureLanuage.GridHeader(dsgrid, "gridView1"); if (gridData != null) { this.gcList.DataSource = gridData; gridView1.BestFitColumns(); CultureLanuage.GridResourcesFrom(gridView1, "gridView1", dsgrid); } } catch (Exception ex) { Console.WriteLine(ex.Message); MessageBox.Show(ex.Message); } #endregion deVoufd.Text = DateTime.Now.Date.AddDays(-1).ToString("yyyy-MM-dd HH:mm:ss"); // deVoufd.Text = System.DateTime.Now.AddDays(-2).ToString("yyyy-MM-dd"); // this.gcSahList.DoubleClick += new System.EventHandler(this.gcSahList_DoubleClick); cmbTypeName.SelectedIndexChanged += cmbTypeName_SelectedIndexChanged; }
public MainForm() { InitializeComponent(); dateFrom.DateTime = DateTime.Now; dateTo.DateTime = DateTime.Now; this.Load += new EventHandler(MainForm_Load); #region Language try { //this.TabText = CultureLanuage.Translator(this.Name, 0, "Result Input [QE31]"); DataSet dsgrid = CultureLanuage.ApplyResourcesFrom(this, "QC06", "MainForm"); DataTable gridData = CultureLanuage.GridHeader(dsgrid, "gridView1"); if (gridData != null) { this.gridControl1.DataSource = gridData; CultureLanuage.GridResourcesFrom(this.gridView1, "gridView1", dsgrid); this.gridView1.BestFitColumns(); } } catch (Exception ex) { Console.WriteLine(ex); MessageBox.Show(ex.Message); } #endregion }
public SPC1Dialog() { InitializeComponent(); CultureLanuage.ApplyResourcesFrom(this, "SPC1", "SPC1Dialog"); btYes.Click += btYes_Click; btNO.Click += btNO_Click; }
public GatePlanFrm() { InitializeComponent(); gridView1.Click += gridView1_Click; cmbSampleName.EditValueChanged += cmbSampleName_EditValueChanged; #region language try { DataSet dsgrid = CultureLanuage.ApplyResourcesFrom(this, "QC22", this.Name); DataTable gridData = CultureLanuage.GridHeader(dsgrid, "gridView1"); if (gridData != null) { this.gridControl1.DataSource = gridData; gridView1.BestFitColumns(); CultureLanuage.GridResourcesFrom(gridView1, "gridView1", dsgrid); } } catch (Exception ex) { Console.WriteLine(ex); MessageBox.Show(ex.Message); } #endregion }
public FormEditer() { InitializeComponent(); this.Load += new EventHandler(FormEditer_Load); btAccept.Click += new EventHandler(btAccept_Click); btReject.Click += new EventHandler(btReject_Click); btCancel.Click += new EventHandler(btCancel_Click); gridView1.Click += new EventHandler(gridView1_Click); #region language try { DataSet dsgrid = CultureLanuage.ApplyResourcesFrom(this, "QA23", this.Name); DataTable gridData = CultureLanuage.GridHeader(dsgrid, "gridView1"); if (gridData != null) { this.gridControl1.DataSource = gridData; gridView1.BestFitColumns(); CultureLanuage.GridResourcesFrom(gridView1, "gridView2", dsgrid); } } catch (Exception ex) { Console.WriteLine(ex); MessageBox.Show(ex.Message); } #endregion }
private void Init_Load() { #region Language try { CultureLanuage.ApplyResourcesFrom(this, "QC21", "QC21"); CultureLanuage.ApplyResourcesFrom(_QC21Dialog, "QC21", "QC21Dialog"); CultureLanuage.ApplyResourcesFrom(_AddPlan, "QC21", "AddPlan"); ChangeGridViewLanguage("gridView1"); } catch (Exception ex) { Console.WriteLine(ex); MessageBox.Show("Translate error:" + ex.Message); } #endregion _AddPlan.AddPlan_cmbSample_SelectedIndexChanged += AddPlan_cmbSample_SelectedIndexChanged; // _AddPlan.MaterialSource = GetMaterials(_AddPlan.SampleName); _QC21View.eventSampleMaterial += new EventHandler(qC21View_eventSampleMaterial); _QC21View.eventMaterialGetPlan += new EventHandler(qC21View_eventMaterialGetPlan); //成品 工序 _QC21View.InitForm(); _AddPlan.dtListTypeName = report.GetQCReport("QCW1_QueryTypeName", new[] { "Lang" }, new object[] { MyLanguage.Language }).Tables[0]; _QC21View.dtListTypeName = report.GetQCReport("QCW1_QueryTypeName", new[] { "Lang" }, new object[] { MyLanguage.Language }).Tables[0]; WorkSpace.Show(_QC21View); }
private void QE31_Load(object sender, EventArgs e) { if (IsLanguage) { #region Language this.TabText = CultureLanuage.Translator(this.Name, 0, "Result Input [QE31]"); DataSet dsgrid = CultureLanuage.ApplyResourcesFrom(_QE31View, "QE31", "QE31View"); DataTable gridData = CultureLanuage.GridHeader(dsgrid, "gridView1"); if (gridData != null) { _QE31View.gridControl1.DataSource = gridData; CultureLanuage.GridResourcesFrom(_QE31View.gridView1, "gridView1", dsgrid); _QE31View.gridView1.BestFitColumns(); } gridData = CultureLanuage.GridHeader(dsgrid, "gridView2"); if (gridData != null) { _QE31View.gridControl2.DataSource = gridData; CultureLanuage.GridResourcesFrom(_QE31View.gridView2, "gridView2", dsgrid); _QE31View.gridView2.BestFitColumns(); } #endregion } }
public MainForm() { InitializeComponent(); this.Load += new EventHandler(MainForm_Load); #region Language try { DataSet dsgrid = CultureLanuage.ApplyResourcesFrom(this, "QE41", "MainForm"); DataTable gridData = CultureLanuage.GridHeader(dsgrid, "gridView1"); if (gridData != null) { this.gridControl1.DataSource = gridData; CultureLanuage.GridResourcesFrom(this.gridView1, "gridView1", dsgrid); this.gridView1.BestFitColumns(); } gridData = CultureLanuage.GridHeader(dsgrid, "gridView2"); if (gridData != null) { this.gridControl2.DataSource = gridData; CultureLanuage.GridResourcesFrom(this.gridView2, "gridView2", dsgrid); this.gridView2.BestFitColumns(); } } catch (Exception ex) { Console.WriteLine(ex); MessageBox.Show(ex.Message); } #endregion }
public AT01() { InitializeComponent(); RegisterCommand(); Workspace.Show(_AT01View); #region Languages try { CultureLanuage.ApplyResourcesFrom(this, "AT01", "AT01"); CultureLanuage.ApplyResourcesFrom(_AT01Dialog, "AT01", "AT01Dialog"); DataSet dsgrid = CultureLanuage.ApplyResourcesFrom(_AT01View, "AT01", "AT01View"); DataTable gridData = CultureLanuage.GridHeader(dsgrid, "gridView1"); if (gridData != null) { _AT01View.gridControl1.DataSource = gridData; CultureLanuage.GridResourcesFrom(_AT01View.gridView1, "gridView1", dsgrid); _AT01View.gridView1.BestFitColumns(); } } catch (Exception ex) { MessageBox.Show(ex.Message); } #endregion }
private void AddPOLYSSP(string sampleName, string materialNo, bool isSampleId) { AddPOLYSSP _AddPOLYSSP = new AddPOLYSSP(sampleName, materialNo, isSampleId); _AddPOLYSSP.LineList = GetLines(sampleName); _AddPOLYSSP.CreateTypeLoad = GetPlanType(); CultureLanuage.ApplyResourcesFrom(_AddPOLYSSP, "QC21", "AddPOLYSSP"); _AddPOLYSSP.ShowDialog(); if (_AddPOLYSSP.rValue) { string msg = _AddPOLYSSP.ReadyWork; if (string.IsNullOrEmpty(msg)) { DOCPlan _DOC = _AddPOLYSSP.GetDocPlan; string VoucherID = ""; if (biz.InsertPlan(_DOC, ref VoucherID, out msg)) { WriteTips(5, "Add VoucherID DOC :successful!"); _QC21View.dtGrid = GetPlan(); } else { WriteTips(5, msg, false); } } else { WriteTips(5, msg); } } }
public MainForm() { InitializeComponent(); btSearchPlan.Click += btSearchPlan_Click; btCreateByGate.Click += btCreateByGate_Click; butTransportPlan.Click += butTransportPlan_Click; this.btDelete.Click += btDelete_Click; btReturn.Click += btReturn_Click; butAddGatePlan.Click += butAddGatePlan_Click; WorkSpace.Show(_QueryReceivePlan); // SearchVoucherReceive(); step = Step.QueryPlanStep; // _QueryReceivePlan.MaterialSource = GetMaterialList; DataTable dtSample = report.GetQCReport("QC22_SamplesByCategory", new[] { "TypeID", "Lang" }, new object[] { "3", MyLanguage.Language }).Tables[0];; _QueryReceivePlan.SetSamples = dtSample; _GatePlanFrm.SetSamples = dtSample; //QC02_QueryMaterialList //GetMaterialList = report.GetQCReport("Q_Materials", new string[] { "SampleName", "Query" }, // new object[] { _GatePlanFrm.SelectSampleName, "S" }).Tables[0]; // _GatePlanFrm.MaterialSource = GetMaterialList; #region language try { CultureLanuage.ApplyResourcesFrom(this, "QC22", this.Name); } catch (Exception ex) { Console.WriteLine(ex); } #endregion }
public QA23() { InitializeComponent(); Workspace.Show(_QA23View); btSearch.Click += btSearch_Click; _QA23View.event_cmbMaterial += _QA23Viewevent_cmbMaterial; _QA23View.event_SampleName += _QA23View_event_SampleName; _QA23View.eventShowDetails += _QA23View_eventShowDetails; _QA23Dialog.AcceptRejectEvent += _QA23DialogAcceptRejectEvent; _QA23View.eventVoucherIDKeyDown += _QA23View_eventVoucherIDKeyDown; _QA23View.eventDraftKeyDown += _QA23View_eventDraftKeyDown; _QA23View.eventgvdClick2 += _QA23View_eventgvdClick2; btnExit.Click += btnExit_Click; btnADraft.Enabled = false; btnAcceptVoucher.Enabled = false; btnRejectDraft.Enabled = false; btnRejectVoucher.Enabled = false; btnADraft.Click += btnADraft_Click; btnRejectDraft.Click += btnRejectDraft_Click; btnAcceptVoucher.Click += btnAcceptVoucher_Click; btnRejectVoucher.Click += btnRejectVoucher_Click; //#region Languages CultureLanuage.ApplyResourcesFrom(this, "QA23", "QA23"); /// CultureLanuage.ApplyResourcesFrom(_QA23View, "QA23", "QA23View"); CultureLanuage.ApplyResourcesFrom(_QA23Dialog, "QA23", "QA23Dialog"); DataSet dsgrid = CultureLanuage.ApplyResourcesFrom(_QA23View, "QA23", "QA23View"); DataTable gridData = CultureLanuage.GridHeader(dsgrid, "gridView1"); if (gridData != null) { _QA23View.gridControl1.DataSource = gridData; CultureLanuage.GridResourcesFrom(_QA23View.gridView1, "gridView1", dsgrid); _QA23View.gridView1.BestFitColumns(); } gridData = CultureLanuage.GridHeader(dsgrid, "gridView2"); if (gridData != null) { _QA23View.gridControl2.DataSource = gridData; CultureLanuage.GridResourcesFrom(_QA23View.gridView2, "gridView2", dsgrid); _QA23View.gridView2.BestFitColumns(); } gridData = CultureLanuage.GridHeader(dsgrid, "gridView3"); if (gridData != null) { _QA23View.gridControl3.DataSource = gridData; CultureLanuage.GridResourcesFrom(_QA23View.gridView3, "gridView3", dsgrid); _QA23View.gridView3.BestFitColumns(); } //#endregion }
public SPC1() { InitializeComponent(); Init_Load(); RegisterEvent(); #region Languages CultureLanuage.ApplyResourcesFrom(this, "SPC1", "SPC1"); #endregion }
public GD01() { InitializeComponent(); #region language CultureLanuage.ApplyResourcesFrom(this, "GD01", this.Name); #endregion Init_Load(); btSearch.Click += btSearch_Click; }
void MainForm_Load(object sender, EventArgs e) { if (IsLanguage) { #region Language //this.TabText = CultureLanuage.Translator(this.Name, 0, "Result Input [QE31]"); DataSet dsgrid = CultureLanuage.ApplyResourcesFrom(this, "QA23", "MainForm"); DataTable gridData = CultureLanuage.GridHeader(dsgrid, "gridView1"); if (gridData != null) { this.gridControl1.DataSource = gridData; CultureLanuage.GridResourcesFrom(this.gridView1, "gridView1", dsgrid); this.gridView1.BestFitColumns(); } gridData = CultureLanuage.GridHeader(dsgrid, "gridView2"); if (gridData != null) { this.gridControl2.DataSource = gridData; CultureLanuage.GridResourcesFrom(this.gridView2, "gridView2", dsgrid); this.gridView2.BestFitColumns(); } #endregion } btAcceptDraft.Enabled = false; btRejectDraft.Enabled = false; btAcceptVoucher.Enabled = false; btRejectVoucher.Enabled = false; bar1.Refresh(); txtDraftID.KeyDown += new KeyEventHandler(txtDraftID_KeyDown); txtVoucherID.KeyDown += new KeyEventHandler(txtVoucherID_KeyDown); gridView1.Click += new EventHandler(gridView1_Click); btAcceptVoucher.Click += new EventHandler(btAcceptVoucher_Click); btAcceptDraft.Click += new EventHandler(btAcceptDraft_Click); btPlanAddConfirm.Click += new EventHandler(btPlanAddConfirm_Click); btRejectDraft.Click += new EventHandler(btRejectDraft_Click); btRejectVoucher.Click += new EventHandler(btRejectVoucher_Click); butReqQuery.Click += new EventHandler(butReqQuery_Click); // gridView1.Columns[0].da = "DateTime"; QueryDraftPlan("", ""); QuerySampleAttribute(""); }
public GD01View() { InitializeComponent(); #region language DataSet dsgrid = CultureLanuage.ApplyResourcesFrom(this, "GD01", this.Name); DataTable gridData = CultureLanuage.GridHeader(dsgrid, "gridView1"); if (gridData != null) { this.gridControl1.DataSource = gridData; gridView1.BestFitColumns(); CultureLanuage.GridResourcesFrom(gridView1, "gridView1", dsgrid); } #endregion RegisterCommand(); }
void MainForm_Load(object sender, EventArgs e) { btSearchSure.Click += new EventHandler(btSearchSure_Click); btVouSubmit.Click += new EventHandler(btVouSubmit_Click); btItemSubmit.Click += new EventHandler(btItemSubmit_Click); btItemRelease.Click += new EventHandler(btItemRelease_Click); btSearchback.Click += new EventHandler(btSearchback_Click); btVouRelease.Click += new EventHandler(btVouRelease_Click); //txtVoucherID, txtLotNo, txtSampleName, txtSampleID txtVoucherID.KeyDown += new KeyEventHandler(txtVoucherID_KeyDown); txtLotNo.KeyDown += new KeyEventHandler(txtLotNo_KeyDown); txtSampleName.KeyDown += new KeyEventHandler(txtSampleName_KeyDown); txtSampleID.KeyDown += new KeyEventHandler(txtSampleID_KeyDown); gridView1.Click += new EventHandler(gridView1_Click); this.gridView1.RowStyle += new DevExpress.XtraGrid.Views.Grid.RowStyleEventHandler(gridView1_RowStyle); gridView2.Click += new EventHandler(gridView2_Click); gridView2.RowCellStyle += new DevExpress.XtraGrid.Views.Grid.RowCellStyleEventHandler(gridView2_RowCellStyle); cbFromDate.DateTime = DateTime.Now.AddMonths(-1); //Set Default value cbEndDate.DateTime = DateTime.Now; #region Languages if (IsLanguage) { CultureLanuage.ApplyResourcesFrom(this, "QE41", "MainForm"); DataSet dsgrid = CultureLanuage.ApplyResourcesFrom(this, "QE41", "MainForm"); DataTable gridData = CultureLanuage.GridHeader(dsgrid, "gridView1"); DataTable gridData2 = CultureLanuage.GridHeader(dsgrid, "gridView2"); if (gridData != null) { this.gridControl1.DataSource = gridData; CultureLanuage.GridResourcesFrom(this.gridView1, "gridView1", dsgrid); this.gridView1.BestFitColumns(); } if (gridData2 != null) { this.gridControl2.DataSource = gridData; CultureLanuage.GridResourcesFrom(this.gridView2, "gridView2", dsgrid); this.gridView2.BestFitColumns(); } } #endregion }
public MainForm() { InitializeComponent(); #region language CultureLanuage.ApplyResourcesFrom(this, "QC07", this.Name); #endregion butReceive.Click += butReceive_Click; this.Load += new System.EventHandler(this.Main_Load); btQuery.Click += btQuery_Click; this.butReturn.Click += butReturn_Click; _SerchPlanView.eventcmbTypeName_SelectedIndexChanged += _SerchPlanView_eventcmbTypeName_SelectedIndexChanged; DataTable DtTypeName = rep.GetQCReport("QCW1_QueryTypeName", new string[] { "Lang" }, new object[] { MyLanguage.Language }).Tables[0]; _SerchPlanView.TypeNameLoad = DtTypeName; dWorkSpace.Show(_SerchPlanView); }
private void ChangeGridViewLanguage(string gridViewName) { try { _QC21View.gridView1.Columns.Clear(); DataSet dsgrid = CultureLanuage.ApplyResourcesFrom(_QC21View, "QC21", "QC21View"); DataTable gridData = CultureLanuage.GridHeader(dsgrid, gridViewName); if (gridData != null) { _QC21View.gridControl1.DataSource = gridData; CultureLanuage.GridResourcesFrom(_QC21View.gridView1, gridViewName, dsgrid); _QC21View.gridView1.BestFitColumns(); } } catch (Exception ex) { MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void RegisterCommand() { gridView1.FocusedRowChanged += gridView1_FocusedRowChanged; gridView2.Click += gridView2_Click; gridView1.RowCellClick += gridView1_RowCellClick; gridView2.OptionsBehavior.AutoSelectAllInEditor = true; gridView2.RowCellStyle += gridView2_RowCellStyle; gridView2.CellValueChanged += gridView2_CellValueChanged; gridView2.OptionsBehavior.Editable = true; gridControl2.ProcessGridKey += gridControl2_ProcessGridKey; #region Language try { // this.TabText = CultureLanuage.Translator(this.Name, 0, "Result Input [QE31]"); DataSet dsgrid = CultureLanuage.ApplyResourcesFrom(this, "QE31", "QE31View"); DataTable gridData = CultureLanuage.GridHeader(dsgrid, "gridView1"); if (gridData != null) { this.gridControl1.DataSource = gridData; CultureLanuage.GridResourcesFrom(this.gridView1, "gridView1", dsgrid); this.gridView1.BestFitColumns(); } gridData = CultureLanuage.GridHeader(dsgrid, "gridView2"); if (gridData != null) { this.gridControl2.DataSource = gridData; CultureLanuage.GridResourcesFrom(this.gridView2, "gridView2", dsgrid); this.gridView2.BestFitColumns(); } } catch (Exception ex) { Console.WriteLine(ex); MessageBox.Show(ex.Message); } #endregion this.gridView1.RowStyle += new DevExpress.XtraGrid.Views.Grid.RowStyleEventHandler(gridView1_RowStyle); }
public MT01() { InitializeComponent(); RegisterCommand(); Workspace.Show(_MT01View); // why do you rewrite Infrastructure class #region Languages CultureLanuage.ApplyResourcesFrom(this, "MT01", "MT01"); CultureLanuage.ApplyResourcesFrom(_MT01Dialog, "MT01", "MT01Dialog"); DataSet dsgrid = CultureLanuage.ApplyResourcesFrom(_MT01View, "MT01", "MT01View"); DataTable gridData = CultureLanuage.GridHeader(dsgrid, "gridView1"); if (gridData != null) { _MT01View.gridControl1.DataSource = gridData; CultureLanuage.GridResourcesFrom(_MT01View.gridView1, "gridView1", dsgrid); _MT01View.gridView1.BestFitColumns(); } #endregion }
public FormEditer() { InitializeComponent(); #region Language try { //this.TabText = CultureLanuage.Translator(this.Name, 0, "Result Input [QE31]"); CultureLanuage.ApplyResourcesFrom(this, "QC06", "FormEditer"); } catch (Exception ex) { Console.WriteLine(ex); MessageBox.Show(ex.Message); } #endregion this.cmbCreateType.DataSource = rep.GetQCReport("Q_GetCreatePlanType", new string[] { "Lang" }, new object[] { MIS.Utility.MyLanguage.Language }).Tables[0]; this.cmbCreateType.DisplayMember = "Type"; this.cmbCreateType.ValueMember = "ID"; }
public SP01() { InitializeComponent(); Init_Load(); RegisterCommand(); #region Languages CultureLanuage.ApplyResourcesFrom(this, "SP01", "SP01"); CultureLanuage.ApplyResourcesFrom(_QCDialog, "SP01", "QCDialog"); DataSet dsgrid = CultureLanuage.ApplyResourcesFrom(_SP01View, "SP01", "SP01View"); DataTable gridData = CultureLanuage.GridHeader(dsgrid, "gridView1"); if (gridData != null) { _SP01View.gridControl1.DataSource = gridData; CultureLanuage.GridResourcesFrom(_SP01View.gridView1, "gridView1", dsgrid); _SP01View.gridView1.BestFitColumns(); } #endregion }
public RawFrm() { InitializeComponent(); txtDate.EditValue = DateTime.Today.ToString("yyyy-MM-dd"); txtDate.Properties.EditMask = "yyy-MM-dd"; txtDateofSample.EditValue = DateTime.Today.ToString("yyyy-MM-dd"); txtDateofSample.Properties.EditMask = "yyy-MM-dd"; btSave.Click += btSave_Click; btCancel.Click += btCancel_Click; #region language try { CultureLanuage.ApplyResourcesFrom(this, "QC07", this.Name); } catch (Exception ex) { Console.WriteLine(ex); MessageBox.Show(ex.Message); } #endregion }
public SPC1View() { InitializeComponent(); gridView1.Click += gridView1_Click; gridView1.DoubleClick += new EventHandler(gridView1_DoubleClick); cmbTypeName.SelectedIndexChanged += cmbTypeName_SelectedIndexChanged; cmbLabName.SelectedIndexChanged += cmbLabName_SelectedIndexChanged; cmbSample.SelectedIndexChanged += cmbSample_SelectedIndexChanged; try { DataSet dsgrid = CultureLanuage.ApplyResourcesFrom(this, "SPC1", "SPC1View"); DataTable gridData = CultureLanuage.GridHeader(dsgrid, "gridView1"); if (gridData != null) { this.gridControl1.DataSource = gridData; CultureLanuage.GridResourcesFrom(this.gridView1, "gridView1", dsgrid); this.gridView1.BestFitColumns(); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public MainForm() { InitializeComponent(); CultureLanuage.ApplyResourcesFrom(this, "CU18", "MainForm"); }