async private void OptionRemoteData() { mesService = new MesService.MesServiceClient(); //获取零件号可选项 DataSet dataSet = null;// await mesService.SelectProductTypeNoAsync(""); DataTable dataSource = dataSet.Tables[0]; cb_type_no.Items.Clear(); cb_sn_type_num.Items.Clear(); for (int i = 0; i < dataSource.Rows.Count; i++) { cb_type_no.Items.Add(dataSource.Rows[i][1].ToString().Trim()); cb_sn_type_num.Items.Add(dataSource.Rows[i][1].ToString().Trim()); } //获取所有站位可选项 DataTable stations = new DataTable();//(await mesService.SelectProduceAsync("","")).Tables[0]; cb_sn_station.Items.Clear(); listView_select_station.Items.Clear(); for (int i = 0; i < stations.Rows.Count; i++) { cb_sn_station.Items.Add(stations.Rows[i][1].ToString().Trim()); var stationName = stations.Rows[i][1].ToString().Trim(); LoadListViewData(stationName); } }
private void UserManager_Load(object sender, EventArgs e) { serviceClient = new MesService.MesServiceClient(); InitDataTable(); DataGridViewCommon.SetRadGridViewProperty(this.radGridView1, false); this.radGridView1.ReadOnly = true; SelectAllUser(); }
private void Form1_Load(object sender, EventArgs e) { tb_sn.Text = "sn_001792j"; tb_typeno.Text = "typeNo00912"; tb_station.Text = "FIRST"; tb_result.Text = "PASS"; tb_date.Text = "2019-01-09 12:12:00"; serviceClient = new MesService.MesServiceClient(); }
private void Init() { serviceClient = new MesService.MesServiceClient(); DataGridViewCommon.SetRadGridViewProperty(this.radGridViewSn, false); DataGridViewCommon.SetRadGridViewProperty(this.radGridViewPackage, false); DataGridViewCommon.SetRadGridViewProperty(this.radGridViewMaterial, false); DataGridViewCommon.SetRadGridViewProperty(this.radGridViewCheck, false); DataGridViewCommon.SetRadGridViewProperty(this.radGridViewQuanlity, false); this.radGridViewSn.ReadOnly = true; this.radGridViewPackage.ReadOnly = true; this.radGridViewMaterial.ReadOnly = true; this.radGridViewCheck.ReadOnly = true; this.radGridViewQuanlity.ReadOnly = true; InitDataTable(); this.panel_sn.Visible = true; this.panel_sn.Dock = DockStyle.Fill; this.tool_sn_exportFilter.Items.Clear(); this.tool_sn_exportFilter.Items.Add(GridViewExport.ExportFormat.EXCEL); this.tool_sn_exportFilter.Items.Add(GridViewExport.ExportFormat.HTML); this.tool_sn_exportFilter.Items.Add(GridViewExport.ExportFormat.PDF); this.tool_sn_exportFilter.Items.Add(GridViewExport.ExportFormat.CSV); this.tool_sn_exportFilter.SelectedIndex = 0; this.tool_package_exportFilter.Items.Clear(); this.tool_package_exportFilter.Items.Add(GridViewExport.ExportFormat.EXCEL); this.tool_package_exportFilter.Items.Add(GridViewExport.ExportFormat.HTML); this.tool_package_exportFilter.Items.Add(GridViewExport.ExportFormat.PDF); this.tool_package_exportFilter.Items.Add(GridViewExport.ExportFormat.CSV); this.tool_package_exportFilter.SelectedIndex = 0; this.tool_material_exportFilter.Items.Clear(); this.tool_material_exportFilter.Items.Add(GridViewExport.ExportFormat.EXCEL); this.tool_material_exportFilter.Items.Add(GridViewExport.ExportFormat.HTML); this.tool_material_exportFilter.Items.Add(GridViewExport.ExportFormat.PDF); this.tool_material_exportFilter.Items.Add(GridViewExport.ExportFormat.CSV); this.tool_material_exportFilter.SelectedIndex = 0; this.tool_productCheck_exportFilter.Items.Clear(); this.tool_productCheck_exportFilter.Items.Add(GridViewExport.ExportFormat.EXCEL); this.tool_productCheck_exportFilter.Items.Add(GridViewExport.ExportFormat.HTML); this.tool_productCheck_exportFilter.Items.Add(GridViewExport.ExportFormat.PDF); this.tool_productCheck_exportFilter.Items.Add(GridViewExport.ExportFormat.CSV); this.tool_productCheck_exportFilter.SelectedIndex = 0; this.tool_quanlity_exportFilter.Items.Clear(); this.tool_quanlity_exportFilter.Items.Add(GridViewExport.ExportFormat.EXCEL); this.tool_quanlity_exportFilter.Items.Add(GridViewExport.ExportFormat.HTML); this.tool_quanlity_exportFilter.Items.Add(GridViewExport.ExportFormat.PDF); this.tool_quanlity_exportFilter.Items.Add(GridViewExport.ExportFormat.CSV); this.tool_quanlity_exportFilter.SelectedIndex = 0; if (MESMainForm.currentUsetType != 0) { this.tool_materialClearDB.Enabled = false; this.tool_packageClearDB.Enabled = false; this.tool_productCheckClearDB.Enabled = false; this.tool_quanlityClearDB.Enabled = false; this.tool_SNClearDB.Enabled = false; } this.tool_SNClearDB.Visible = false; this.radDock1.ActiveWindow = this.dw_snHistory; }
private void MESMainForm_Load(object sender, EventArgs e) { //this.pictureBox1.BackgroundImageLayout = ImageLayout.Stretch; serviceClient = new MesService.MesServiceClient(); serviceClientTest = new MesServiceTest.MesServiceClient(); TestCommunication(); IsFirstState = false; IsCompleted = true; this.DialogResult = DialogResult.OK; }
public SearchForm() { InitializeComponent(); this.StartPosition = FormStartPosition.CenterParent; this.MaximizeBox = false; serviceClient = new MesService.MesServiceClient(); SelectMaterialMsg(); this.tb_inputMsg.TextChanged += Tb_inputMsg_TextChanged; this.radGridView1.CellClick += RadGridView1_CellClick; }
async private void InitServiceInstance() { try { serviceClient = new MesService.MesServiceClient(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void ExportDat_Load(object sender, EventArgs e) { serverClient = new MesService.MesServiceClient(); serverTest = new MesServiceTest.MesServiceClient(); SQLServer.SqlConnectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ToString(); SetRadGridViewProperty(this.radGridView1, false); this.bindingNavigator1.ItemClicked += BindingNavigator1_ItemClicked; //this.radGridView1.VirtualMode = true; this.radGridView1.CellValuePushed += RadGridView1_CellValuePushed; this.radGridView1.CellValueNeeded += RadGridView1_CellValueNeeded; this.comboBox1.Items.AddRange(new string[] { "烧录工站", "灵敏度测试工站", "外壳装配工站", "气密测试工站", "支架装配工站", "成品测试工站" }); }
private void Init() { serviceClient = new MesService.MesServiceClient(); pmListTemp = new List <ProductMaterial>(); pmStockList = new List <ProductMaterial>(); this.radDock1.ActiveWindow = this.dw_materialBind; DataGridViewCommon.SetRadGridViewProperty(this.radGridViewBind, true); DataGridViewCommon.SetRadGridViewProperty(this.radGridViewStock, false); BindingDataSource(); InitDataTable(); InitMaterialRID(); }
private void InitServiceInstance() { try { mesService = new MesService.MesServiceClient(); } catch (Exception ex) { MessageBox.Show("连接服务异常", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); LogHelper.Log.Error("获取服务异常!" + ex.Message); } }
private void ProductPackageDetail_Load(object sender, EventArgs e) { this.tool_package_exportFilter.Items.Clear(); this.tool_package_exportFilter.Items.Add(GridViewExport.ExportFormat.EXCEL); this.tool_package_exportFilter.Items.Add(GridViewExport.ExportFormat.HTML); this.tool_package_exportFilter.Items.Add(GridViewExport.ExportFormat.PDF); this.tool_package_exportFilter.Items.Add(GridViewExport.ExportFormat.CSV); this.tool_package_exportFilter.SelectedIndex = 0; serviceClient = new MesService.MesServiceClient(); DataGridViewCommon.SetRadGridViewProperty(this.radGridViewPackage, false); this.radGridViewPackage.ReadOnly = true; LoadDataSource(this.outCaseCode); }
async private void InitConfig() { serviceClient = new MesService.MesServiceClient(); serviceClientTest = new MesServiceTest.MesServiceClient(); this.rbtn_material_stock.CheckState = CheckState.Checked; this.cb_materialState.Items.Add("关闭"); this.cb_materialState.SelectedIndex = 0; this.cb_materialState.ForeColor = Color.Red; this.radDateTimePicker1.Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); var currentProcess = await serviceClientTest.SelectCurrentTProcessAsync(); string[] array = await serviceClientTest.SelectStationListAsync(currentProcess); if (array.Length > 0) { cb_station.Items.Clear(); foreach (var station in array) { cb_station.Items.Add(station); } } DataTable dt = (await serviceClient.SelectMaterialAsync("", MesService.MaterialStockState.PUT_IN_STOCK_AND_STATEMENT)).Tables[0]; if (dt.Rows.Count < 1) { return; } this.cb_materialCode.Items.Clear(); for (int i = 0; i < dt.Rows.Count; i++) { this.cb_materialCode.Items.Add(dt.Rows[i][0].ToString()); } this.cb_materialCode.AutoCompleteSource = AutoCompleteSource.ListItems; this.cb_materialCode.AutoCompleteMode = AutoCompleteMode.SuggestAppend; //productTypeNo var productTypeNoList = await serviceClientTest.SelectAllTProcessAsync(); this.cb_typeNo.MultiColumnComboBoxElement.Columns.Add("typeNo"); foreach (var typeNo in productTypeNoList) { this.cb_typeNo.EditorControl.Rows.Add(typeNo); } this.cb_typeNo.EditorControl.ShowColumnHeaders = false; this.cb_typeNo.BestFitColumns(); this.cb_typeNo.Text = ""; this.cb_stationName.MultiColumnComboBoxElement.Columns.Add("stationName"); }
private void Init() { this.status_username.Text = MESMainForm.currentUser; this.cb_curprocess.DropDownStyle = ComboBoxStyle.DropDownList; this.cb_processItem.DropDownStyle = ComboBoxStyle.DropDownList; serviceClient = new MesService.MesServiceClient(); serviceClientTest = new MesServiceTest.MesServiceClient(); stationListTemp = new List <string>(); DataGridViewCommon.SetRadGridViewProperty(this.radGridView1, true); this.radGridView1.AllowRowHeaderContextMenu = false; DataSource(); RefreshCurrentProcess(); this.cb_processItem.Text = serviceClientTest.SelectCurrentTProcess(); }
private void TestLogDetail_Load(object sender, EventArgs e) { InitLogDataSource(); serviceClient = new MesService.MesServiceClient(); DataGridViewCommon.SetRadGridViewProperty(this.radGridView1, false); SetGroup(); this.radGridView1.ReadOnly = true; this.pickerStartTime.Text = DateTime.Now.ToString("yyyy-MM-dd") + " 00:00:00"; this.pickerEndTime.Text = DateTime.Now.ToString("yyyy-MM-dd") + " 23:59:59"; var ds = serviceClient.SelectTestLogDataDetail(productSn, "", ""); SetConditions(); LoadDataSource(ds); }
private void MaterialDetailMsg_Load(object sender, EventArgs e) { this.tool_exportFilter.Items.Clear(); this.tool_exportFilter.Items.Add(GridViewExport.ExportFormat.EXCEL); this.tool_exportFilter.Items.Add(GridViewExport.ExportFormat.HTML); this.tool_exportFilter.Items.Add(GridViewExport.ExportFormat.PDF); this.tool_exportFilter.Items.Add(GridViewExport.ExportFormat.CSV); this.tool_exportFilter.SelectedIndex = 0; serviceClient = new MesService.MesServiceClient(); DataGridViewCommon.SetRadGridViewProperty(this.radGridView1, false); this.radGridView1.ReadOnly = true; InitDataTable(); SelectMaterialDetail(this.materialCode); }
async private void Material_Load(object sender, EventArgs e) { serviceClient = new MesService.MesServiceClient(); DataGridViewCommon.SetRadGridViewProperty(this.radGridView1, true); materialCodeTemp = new List <string>(); rlbx_explain.Text = "在新行添加物料名称、物料库存,右键行头可删除行数据"; //设置第一列为只读 this.radGridView1.DataSource = DataSource(); SelectMaterial();//查询数据 this.radGridView1.Columns[0].ReadOnly = true; this.radGridView1.CellBeginEdit += RadGridView1_CellBeginEdit; this.radGridView1.CellEndEdit += RadGridView1_CellEndEdit; this.radGridView1.ContextMenuOpening += RadGridView1_ContextMenuOpening; this.radGridView1.MouseDown += RadGridView1_MouseDown; }
private void ProductType_Load(object sender, EventArgs e) { mesService = new MesService.MesServiceClient(); modifyTypeNoTemp = new List <string>(); InitDataSource(); DataGridViewCommon.SetRadGridViewProperty(this.radGridView1, true); SelectServiceData(""); btn_commit.Click += Btn_commit_Click; btn_select.Click += Btn_select_Click; btn_clear_server.Click += Btn_clear_server_Click; this.radGridView1.ContextMenuOpening += RadGridView1_ContextMenuOpening; this.radGridView1.MouseDown += RadGridView1_MouseDown; this.radGridView1.CellBeginEdit += RadGridView1_CellBeginEdit; this.radGridView1.CellEndEdit += RadGridView1_CellEndEdit; }
async private void Init() { serviceClient = new MesService.MesServiceClient(); //packageProduct = new MesService.PackageProduct(); InitCaseCodeList(); //获取型号 cb_typeNo.Items.Clear(); DataTable dt = null;// (await serviceClient.SelectProductTypeNoAsync("")).Tables[0]; for (int i = 0; i < dt.Rows.Count; i++) { cb_typeNo.Items.Add(dt.Rows[i][0].ToString()); } cb_typeNo.Items.Add(""); DataSource(); DataGridViewCommon.SetRadGridViewProperty(this.radGridView1, false); }
private void Init() { serviceClient = new MesService.MesServiceClient(); DataGridViewCommon.SetRadGridViewProperty(this.radGridView1, false); this.radGridView1.Columns[0].Width = 15; var len1 = ConfigurationManager.AppSettings["snLength1"].ToString(); var len2 = ConfigurationManager.AppSettings["snLength2"].ToString(); if (!string.IsNullOrEmpty(len1) && !string.IsNullOrEmpty(len2)) { if (!int.TryParse(len1, out snLength1) || !int.TryParse(len2, out snLength2)) { MessageBox.Show("配置文件格式错误!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error); } } }
public SearchProduct() { InitializeComponent(); this.StartPosition = FormStartPosition.CenterParent; this.MaximizeBox = false; this.rb_binded.CheckState = CheckState.Checked; serviceClient = new MesService.MesServiceClient(); SelectProductBindMsg(); this.tb_search.TextChanged += Tb_inputMsg_TextChanged; this.radGridView1.CellClick += RadGridView1_CellClick; this.radGridView1.CellDoubleClick += RadGridView1_CellDoubleClick; this.rb_binded.CheckStateChanged += Rb_binded_CheckStateChanged; this.rb_unbinded.CheckStateChanged += Rb_unbinded_CheckStateChanged; this.btn_apply.Click += Btn_apply_Click; this.btn_cancel.Click += Btn_cancel_Click; this.bindingNavigator1.ItemClicked += BindingNavigator1_ItemClicked; this.bindingNavigatorCountItem.TextChanged += BindingNavigatorCountItem_TextChanged; this.bindingNavigatorPositionItem.TextChanged += BindingNavigatorPositionItem_TextChanged; }
async private void Init() { serviceClient = new MesService.MesServiceClient(); if (MESMainForm.currentUsetType != 0) { this.tool_clearDB.Enabled = false; } rbtn_today.Checked = true; this.radGridView1.Dock = DockStyle.Fill; DataGridViewCommon.SetRadGridViewProperty(this.radGridView1, false); DataGridViewCommon.SetRadGridViewProperty(this.gridProgrameVersion, false); DataGridViewCommon.SetRadGridViewProperty(this.gridSpec, false); this.radGridView1.ReadOnly = true; this.gridSpec.ReadOnly = true; this.gridProgrameVersion.ReadOnly = true; var dt = (await serviceClient.SelectProductContinairCapacityAsync("")).Tables[0]; if (dt.Rows.Count > 0) { for (int i = 0; i < dt.Rows.Count; i++) { this.tool_queryCondition.Items.Add(dt.Rows[i][0].ToString()); } } //init treeview string path = @"D:\work\project\FigKey\RetrospectiveSystem\project\IIS"; ImageList imageList = new ImageList(); imageList.Images.Add("open", Resources.FolderList32); //LoadTreeView.SetTreeNoByFilePath(this.treeView1,path,new ImageList()); //TreeViewData.PopulateTreeView(path, this.treeView1); this.pickerStartTime.Text = DateTime.Now.ToString("yyyy-MM-dd") + " 00:00:00"; this.pickerEndTime.Text = DateTime.Now.ToString("yyyy-MM-dd") + " 23:59:59"; //this.tool_exportCondition.Items.Add(GridViewExport.ExportFormat.EXCEL.ToString()); //this.tool_exportCondition.Items.Add(GridViewExport.ExportFormat.HTML.ToString()); //this.tool_exportCondition.Items.Add(GridViewExport.ExportFormat.PDF.ToString()); this.tool_exportCondition.Items.Add(GridViewExport.ExportFormat.CSV.ToString()); this.tool_exportCondition.SelectedIndex = 0; this.radDock1.ActiveWindow = this.tool_logData; this.label_delStatus.Visible = false; }
async private void Init() { this.tbx_pwd.PasswordChar = '*'; mesService = new MesService.MesServiceClient(); if (!TestCommunication()) { return; } //设置单行 //tbx_username.Multiline = false; tbx_pwd.Multiline = false; DataSet ds = await mesService.GetAllUserInfoAsync(); if (ds == null) { MessageBox.Show("连接数据库服务异常!", "ERR", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } var dt = ds.Tables[0]; if (dt.Rows.Count > 0) { for (int i = 0; i < dt.Rows.Count; i++) { //tbx_username.Items.Add(dt.Rows[i][0].ToString()); } } else { //添加默认用户 mesService.Register("superAdminMES", "superAdminMES", 0); } tbx_username.Text = ""; configPath = AppDomain.CurrentDomain.BaseDirectory + INI_CONFIG_NAME; ReadLastCfg(); }
private void Init() { serviceClient = new MesService.MesServiceClient(); serviceClientTest = new MesServiceTest.MesServiceClient(); modifyTypeNoTemp = new List <string>(); modifyProductTypeNoList = new List <BasicConfig>(); materialCodeTemp = new List <BasicConfig>(); DataGridViewCommon.SetRadGridViewProperty(this.radGridView1, true); this.radGridView1.AllowRowHeaderContextMenu = false; var bMaterialCode = int.TryParse(ConfigurationManager.AppSettings["materialLength"].ToString(), out materialCodeLength); int.TryParse(ConfigurationManager.AppSettings["IsAutoAdd"].ToString(), out IsAutoAdd); this.menu_exportCondition.Items.Add(GridViewExport.ExportFormat.EXCEL.ToString()); this.menu_exportCondition.Items.Add(GridViewExport.ExportFormat.HTML.ToString()); this.menu_exportCondition.Items.Add(GridViewExport.ExportFormat.PDF.ToString()); this.menu_exportCondition.Items.Add(GridViewExport.ExportFormat.CSV.ToString()); this.menu_exportCondition.Text = GridViewExport.ExportFormat.EXCEL.ToString(); DataSource(); RefreshData(); if (!bMaterialCode) { MessageBox.Show("配置参数格式错误!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
async private void OptionRemoteData() { serviceClient = new MesService.MesServiceClient(); //获取零件号可选项 DataSet dataSet = null;//await serviceClient.SelectProductTypeNoAsync(""); DataTable dataSource = dataSet.Tables[0]; cb_typeNo.Items.Clear(); for (int i = 0; i < dataSource.Rows.Count; i++) { cb_typeNo.Items.Add(dataSource.Rows[i][1].ToString().Trim()); } //获取所有站位可选项 DataTable stations = new DataTable();//(await serviceClient.SelectProduceAsync("", "")).Tables[0]; cb_station.Items.Clear(); for (int i = 0; i < stations.Rows.Count; i++) { cb_station.Items.Add(stations.Rows[i][1].ToString().Trim()); } cb_testRes.Items.Clear(); cb_testRes.Items.Add("PASS"); cb_testRes.Items.Add("FAIL"); }
private void GetBackPwd_Load(object sender, EventArgs e) { serviceClient = new MesService.MesServiceClient(); this.tb_pwd.PasswordChar = '*'; this.tb_repwd.PasswordChar = '*'; }
private void SetStation_Load(object sender, EventArgs e) { serviceClient = new MesService.MesServiceClient(); OptionRemoteData(); }
private void ModifyPwd_Load(object sender, EventArgs e) { serviceClient = new MesService.MesServiceClient(); this.tb_newPwd.PasswordChar = '*'; this.tb_confirmPwd.PasswordChar = '*'; }
private void Register_Load(object sender, EventArgs e) { serviceClient = new MesService.MesServiceClient(); tb_pwd.PasswordChar = '*'; tb_repwd.PasswordChar = '*'; }