/// <summary> /// 构造函数 /// </summary> /// <param name="assemblyType">独立分装类别:阀块、行星轮合件</param> /// <param name="commServer"></param> public FormPrintAssemblyBarCode2(CommResponseServer commServer) { InitializeComponent(); m_commResponseServer = commServer; m_productInfoServer.GetAllProductInfo(out m_productInfo, out m_err); this.cmbPrductType.SelectedIndexChanged -= new System.EventHandler(this.cmbPrductType_SelectedIndexChanged); cmbPrductType.DataSource = m_productInfo; this.cmbPrductType.SelectedIndexChanged += new System.EventHandler(this.cmbPrductType_SelectedIndexChanged); cmbPrductType.DisplayMember = "产品类型编码"; cmbPrductType.ValueMember = "产品类型编码"; cmbPrductType.SelectedIndex = 0; m_productTypeCode = cmbPrductType.SelectedValue.ToString(); lblProductName.Text = (cmbPrductType.SelectedItem as View_P_ProductInfo).产品类型名称; InitAssemblyName(); dateTimePicker1.Value = ServerTime.Time; }
public CVT终检信息查询() { InitializeComponent(); #region 获取产品类型 IQueryable <View_P_ProductInfo> productInfo = null; if (!m_productInfoServer.GetAllProductInfo(out productInfo, out m_strError)) { MessageDialog.ShowErrorMessage(m_strError); } else { foreach (var item in productInfo) { if (!item.是否返修专用) { cmbProductType.Items.Add(item.产品类型编码); } } } cmbProductType.SelectedIndex = -1; #endregion }
public 线返修复制产品型号() { InitializeComponent(); #region 获取所有产品编码(产品类型)信息 if (!m_productInfoServer.GetAllProductInfo(out m_productInfo, out m_error)) { MessageDialog.ShowErrorMessage(m_error); btnOK.Enabled = false; return; } if (m_productInfo != null) { foreach (var item in m_productInfo) { cmbSourceProductType.Items.Add(item.产品类型编码); cmbTargetProductType.Items.Add(item.产品类型编码); } cmbSourceProductType.SelectedIndex = 0; cmbTargetProductType.SelectedIndex = 1; } #endregion }
/// <summary> /// 窗体载入 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void UserControlAssembly_Load(object sender, EventArgs e) { IQueryable <View_P_ProductInfo> productInfo = null; if (!m_productInfoServer.GetAllProductInfo(out productInfo, out m_error)) { MessageDialog.ShowErrorMessage(m_error); return; } else { productInfo = from r in productInfo where !r.产品类型名称.Contains("返修") select r; foreach (var item in productInfo) { cmbProductType.Items.Add(item.产品类型编码); } cmbProductType.SelectedIndex = -1; RefreshControl1(); RefreshControl2(); } }
public 装配多批次零件管理(FunctionTreeNodeInfo nodeInfo) { InitializeComponent(); m_authFlag = nodeInfo.Authority; winFormPage1.PageSize = 2000; winFormPage1.RefreshData = new GlobalObject.DelegateCollection.NonArgumentHandle(this.GoToPage); cmbPurpose.DataSource = m_mbpServer.GetPersonnelPurpose().OrderByDescending(k => k.装配用途编号); cmbPurpose.DisplayMember = "装配用途名称"; cmbPurpose.ValueMember = "装配用途编号"; IQueryable <View_P_ProductInfo> productInfo = null; if (!m_productInfoServer.GetAllProductInfo(out productInfo, out m_error)) { MessageDialog.ShowErrorMessage(m_error); return; } else { productInfo = from r in productInfo where !r.产品类型名称.Contains("返修") select r; cmbProductCode.DataSource = productInfo; cmbProductCode.DisplayMember = "产品类型编码"; cmbProductCode.ValueMember = "产品类型编码"; } }
public FormCompareBom(string type) { InitializeComponent(); m_type = type; if (!GlobalObject.GeneralFunction.IsNullOrEmpty("比较Bom")) { string[] paramsName = m_searchParamsServer.GetSearchName("比较Bom"); if (paramsName != null) { cmbSearchName.Items.Clear(); cmbSearchName.Items.Add(""); cmbSearchName.Items.AddRange(paramsName); } } IQueryable <View_P_ProductInfo> productInfo = null; if (!m_productInfoServer.GetAllProductInfo(out productInfo, out m_err)) { MessageDialog.ShowErrorMessage(m_err); } else { foreach (var item in productInfo) { if (!item.是否返修专用) { clbEdition.Items.Add(item.产品类型编码); } } } }
public 线返修记录管理(FunctionTreeNodeInfo nodeInfo) { InitializeComponent(); m_authFlag = nodeInfo.Authority; IQueryable <View_P_ProductInfo> productInfo = null; if (!m_productInfoServer.GetAllProductInfo(out productInfo, out m_error)) { MessageDialog.ShowErrorMessage(m_error); return; } else { productInfo = from r in productInfo where !r.产品类型名称.Contains("返修") select r; cmbProductCode.DataSource = productInfo; cmbProductCode.DisplayMember = "产品类型编码"; cmbProductCode.ValueMember = "产品类型编码"; } SearchData(); }
/// <summary> /// 构造函数 /// </summary> /// <param name="assemblyType">独立分装类别:阀块、行星轮合件</param> /// <param name="commServer"></param> public FormPrintSolelyAssemblyPartBarCode(string assemblyType, CommResponseServer commServer) { InitializeComponent(); m_assemblyType = assemblyType; txtAssemblyName.Text = m_assemblyType; m_commResponseServer = commServer; m_productInfoServer.GetAllProductInfo(out m_productInfo, out m_err); this.cmbPrductType.SelectedIndexChanged -= new System.EventHandler(this.cmbPrductType_SelectedIndexChanged); cmbPrductType.DataSource = m_productInfo; this.cmbPrductType.SelectedIndexChanged += new System.EventHandler(this.cmbPrductType_SelectedIndexChanged); cmbPrductType.DisplayMember = "产品类型编码"; cmbPrductType.ValueMember = "产品类型编码"; cmbPrductType.SelectedIndex = 0; m_productTypeCode = cmbPrductType.SelectedValue.ToString(); dateTimePicker1.Value = ServerTime.Time; InitSerialNo(); }
public 装配BOM(PlatformManagement.FunctionTreeNodeInfo nodeInfo) { InitializeComponent(); m_authFlag = nodeInfo.Authority; SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.ResizeRedraw | ControlStyles.UserPaint | ControlStyles.OptimizedDoubleBuffer, true); UpdateStyles(); this.cmbProductType.SelectedIndexChanged -= new System.EventHandler(this.cmbProductType_SelectedIndexChanged); #region 获取所有产品编码(产品类型)信息 if (!m_productInfoServer.GetAllProductInfo(out m_productInfo, out m_err)) { MessageDialog.ShowErrorMessage(m_err); btnAdd.Enabled = false; btnDelete.Enabled = false; return; } if (m_productInfo != null) { foreach (var item in m_productInfo) { cmbProductType.Items.Add(item.产品类型编码); } } #endregion #region 获取工位 IQueryable <View_P_Workbench> workbench = m_workbenchServer.Workbenchs; if (workbench.Count() > 0) { cmbWorkBench.Items.AddRange((from r in workbench select r.工位).ToArray()); } else { btnAdd.Enabled = false; btnDelete.Enabled = false; MessageDialog.ShowErrorMessage("没有获取到工位信息"); return; } #endregion this.cmbProductType.SelectedIndexChanged += new System.EventHandler(this.cmbProductType_SelectedIndexChanged); if (cmbProductType.Items.Count > 0) { cmbProductType.SelectedIndex = 0; } }
/// <summary> /// 窗体载入 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void UserControlBomMapping_Load(object sender, EventArgs e) { FaceAuthoritySetting.SetVisibly(toolStrip1, BasicInfo.GetFunctionTreeNodeInfo(labelTitle.Text).Authority); this.cmbProductType.SelectedIndexChanged -= new System.EventHandler(this.cmbProductType_SelectedIndexChanged); #region 获取所有产品编码(产品类型)信息 if (!m_productInfoServer.GetAllProductInfo(out m_productInfo, out m_err)) { MessageDialog.ShowErrorMessage(m_err); btnAdd.Enabled = false; btnDelete.Enabled = false; return; } if (m_productInfo != null) { foreach (var item in m_productInfo) { cmbProductType.Items.Add(item.产品类型编码); } } #endregion #region 获取工位 IQueryable <View_P_Workbench> workbench = m_workbenchServer.Workbenchs; if (workbench.Count() > 0) { cmbWorkBench.Items.AddRange((from r in workbench select r.工位).ToArray()); } else { btnAdd.Enabled = false; btnDelete.Enabled = false; MessageDialog.ShowErrorMessage("没有获取到工位信息"); return; } #endregion //InitViewData(cmbProductType.SelectedItem.ToString()); this.cmbProductType.SelectedIndexChanged += new System.EventHandler(this.cmbProductType_SelectedIndexChanged); if (cmbProductType.Items.Count > 0) { cmbProductType.SelectedIndex = 0; } }
/// <summary> /// 构造函数 /// </summary> /// <param name="copyMode">复制模式</param> public FormCopyAssemblySequence(CopyModeEnum copyMode) { InitializeComponent(); m_copyMode = copyMode; #region 获取所有产品编码(产品类型)信息 if (!m_productInfoServer.GetAllProductInfo(out m_productInfo, out m_err)) { MessageDialog.ShowErrorMessage(m_err); btnOK.Enabled = false; return; } if (m_productInfo != null) { foreach (var item in m_productInfo) { cmbSourceProductType.Items.Add(item.产品类型编码); cmbTargetProductType.Items.Add(item.产品类型编码); } cmbSourceProductType.SelectedIndex = 0; cmbTargetProductType.SelectedIndex = 1; } #endregion if (copyMode == CopyModeEnum.制整个产品装配顺序) { cmbWorkbench.Enabled = false; } else { cmbWorkbench.Enabled = true; } #region 获取工位 IQueryable <View_P_Workbench> workbench = m_workbenchServer.Workbenchs; if (workbench.Count() > 0) { cmbWorkbench.Items.AddRange((from r in workbench select r.工位).ToArray()); } else { MessageDialog.ShowErrorMessage("没有获取到工位信息"); btnOK.Enabled = false; } #endregion }
/// <summary> /// 窗体载入 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void UserControlProductType_Load(object sender, EventArgs e) { FaceAuthoritySetting.SetVisibly(toolStrip1, m_authorityFlag); if (!m_productInfoServer.GetAllProductInfo(out m_returnProductType, out m_err)) { MessageDialog.ShowErrorMessage(m_err); return; } RefreshDataGridView(); RefreshControl(); txtProductTypeCode.Focus(); }
public 线返修扭矩防错设置(FunctionTreeNodeInfo nodeInfo) { InitializeComponent(); m_authFlag = nodeInfo.Authority; #region 获取所有产品编码(产品类型)信息 if (!m_productInfoServer.GetAllProductInfo(out m_productInfo, out m_error)) { MessageDialog.ShowErrorMessage(m_error); return; } if (m_productInfo != null) { foreach (var item in m_productInfo) { cmbProductType.Items.Add(item.产品类型编码); cmbQuery.Items.Add(item.产品类型编码); } cmbQuery.Items.Add("全部"); cmbProductType.SelectedIndex = 0; cmbQuery.SelectedIndex = 0; } #endregion DataTable dt = m_offlineFailServer.GetPhase(); if (dt != null && dt.Rows.Count > 0) { cmbPhase.Items.Clear(); for (int i = 0; i < dt.Rows.Count; i++) { cmbPhase.Items.Add(dt.Rows[i]["Phase"].ToString()); } } RefreshDataGridView(); }
public FormCopyProduct() { InitializeComponent(); IQueryable <View_P_ProductInfo> productInfo = null; if (!m_productInfoServer.GetAllProductInfo(out productInfo, out m_error)) { MessageDialog.ShowErrorMessage(m_error); } else { foreach (var item in productInfo) { if (!item.是否返修专用) { cmbProduct.Items.Add(item.产品类型编码); cmbCopyProduct.Items.Add(item.产品类型编码); } } } }
/// <summary> /// 构造函数 /// </summary> /// <param name="copyMode">复制模式</param> public FormCopyProductInfo(CopyModeEnum copyMode) { InitializeComponent(); m_copyMode = copyMode; #region 获取所有产品编码(产品类型)信息 if (!m_productInfoServer.GetAllProductInfo(out m_productInfo, out m_err)) { MessageDialog.ShowErrorMessage(m_err); btnOK.Enabled = false; return; } if (m_productInfo != null) { foreach (var item in m_productInfo) { cmbSourceProductType.Items.Add(item.产品类型编码); //cmbTargetProductType.Items.Add(item.产品类型编码); } cmbSourceProductType.SelectedIndex = 0; //cmbTargetProductType.SelectedIndex = 1; } #endregion if (copyMode == CopyModeEnum.制整个产品零件信息) { cmbParentName.Enabled = false; } else { cmbParentName.Enabled = true; } }
public FormAssemblyMain(FunctionTreeNodeInfo nodeInfo, CommResponseServer commResponseServer) { InitializeComponent(); m_commResponseServer = commResponseServer; m_nodeInfo = nodeInfo; IQueryable <View_P_ProductInfo> productTypeTable = null; if (!m_productInfoServer.GetAllProductInfo(out productTypeTable, out m_err)) { 阀块装配.Enabled = false; 行星轮合件装配.Enabled = false; MessageDialog.ShowErrorMessage(m_err); return; } // 产品类型字典 Dictionary <string, string> productTypeDic = new Dictionary <string, string>(); foreach (var item in productTypeTable) { if (productTypeDic.ContainsKey(item.产品类型名称)) { productTypeDic[item.产品类型名称] = item.产品类型编码; } else { productTypeDic.Add(item.产品类型名称, item.产品类型编码); } } m_commResponseServer.ProductTypeDic = productTypeDic; }
private void FormProductType_Load(object sender, EventArgs e) { AllProduct = null; dataGridView1.Rows.Clear(); try { if (AllProduct == null) { IQueryable <View_P_ProductInfo> productInfo = null; if (!m_productInfoServer.GetAllProductInfo(out productInfo, out m_error)) { MessageDialog.ShowErrorMessage(m_error); } AllProduct = productInfo.ToList(); } DataGridViewCheckBoxColumn column = new DataGridViewCheckBoxColumn(); column.Visible = true; column.Name = "选中"; column.HeaderText = "选中"; column.ReadOnly = false; dataGridView1.Columns.Add(column); dataGridView1.Columns.Add("序号", "序号"); dataGridView1.Columns.Add("产品类型编码", "产品类型编码"); dataGridView1.Columns.Add("产品类型名称", "产品类型名称"); dataGridView1.Columns.Add("产品装配简码", "产品装配简码"); dataGridView1.Columns.Add("是否返修专用", "是否返修专用"); dataGridView1.Columns.Add("备注", "备注"); foreach (DataGridViewColumn item in dataGridView1.Columns) { if (item.Name != "选中") { item.ReadOnly = true; item.Width = item.HeaderText.Length * (int)this.Font.Size + 100; } else { item.Width = 68; item.ReadOnly = false; item.Frozen = false; } } bool selectedFlag = false; int count = 0; foreach (var item in AllProduct) { selectedFlag = false; if (SelectedProduct != null && count < SelectedProduct.Count) { if (SelectedProduct.FindIndex(c => c.产品类型编码 == item.产品类型编码) >= 0) { selectedFlag = true; count++; } } dataGridView1.Rows.Add(new object[] { selectedFlag, item.序号, item.产品类型编码, item.产品类型名称, item.产品装配简码, item.是否返修专用, item.备注 }); } m_count = dataGridView1.Rows.Count; if (m_dataLocalizer == null) { m_dataLocalizer = new UserControlDataLocalizer(dataGridView1, this.Name, UniversalFunction.SelectHideFields(this.Name, dataGridView1.Name, BasicInfo.LoginID)); panelTop.Controls.Add(m_dataLocalizer); m_dataLocalizer.Dock = DockStyle.Bottom; } dataGridView1.Columns["序号"].Visible = false; } catch (Exception err) { MessageDialog.ShowErrorMessage(err.Message); } }