PublicUltraITEM_NAME.cs 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Drawing;
  5. using System.Data;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9. using Infragistics.Win.UltraWinEditors;
  10. using Core.Mes.Client.Comm.Tool;
  11. using CoreFS.CA06;
  12. namespace Core.StlMes.Client.Lims.Data.Mat
  13. {
  14. //需要理化检验的物料
  15. public partial class PublicUltraITEM_NAME : UserControl
  16. {
  17. private string ultSample_Code;//试样编码
  18. public string UltSample_Code
  19. {
  20. get { return ultSAMPLE_NAME.Value == null ? "" : ultSAMPLE_NAME.Value.ToString().Trim(); }
  21. set { ultSAMPLE_NAME.Value = value; }
  22. }
  23. private string ultSample_Name;//试样名称
  24. public string UltSample_Name
  25. {
  26. get { return ultSAMPLE_NAME.Text.Trim(); }
  27. set { ultSAMPLE_NAME.Text = value; }
  28. }
  29. private UltraComboEditor ult;
  30. public UltraComboEditor Ult
  31. {
  32. get { return ultSAMPLE_NAME; }
  33. set { ult = value; }
  34. }
  35. public PublicUltraITEM_NAME()
  36. {
  37. InitializeComponent();
  38. }
  39. private void PublicUltraSAMPLE_NAME_Load(object sender, EventArgs e)
  40. {
  41. }
  42. //查询原材料检验需要试验的物料
  43. public void QueryMatItemsName(OpeBase ob)
  44. {
  45. try
  46. {
  47. if (ob == null)
  48. {
  49. return;
  50. }
  51. DataTable dt = PublicServer.GetData("com.steering.lims.data.base.FrmBaseSelectItems.QueryMatItemsName",
  52. new Object[] { }, ob);
  53. if (dt == null || dt.Rows.Count == 0)
  54. {
  55. return;
  56. }
  57. DataRow dr = dt.NewRow();
  58. dr[0] = "";
  59. dr[1] = "";
  60. dt.Rows.InsertAt(dr, 0);
  61. ultSAMPLE_NAME.DataSource = dt;
  62. ultSAMPLE_NAME.ValueMember = "ITEM_CODE";
  63. ultSAMPLE_NAME.DisplayMember = "ITEM_NAME";
  64. }
  65. catch (Exception ex)
  66. {
  67. MessageUtil.ShowError(ex.Message);
  68. }
  69. }
  70. }
  71. }