FrmPurPlanMat.cs 46 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9. using Infragistics.Win.UltraWinGrid;
  10. using Infragistics.Win;
  11. using CoreFS.CA06;
  12. using Pur.Entity;
  13. using Core.Mes.Client.Comm.Control;
  14. using Core.Mes.Client.Comm;
  15. using Core.Mes.Client.Comm.Tool;
  16. using Pur.Entity.configureEntity;
  17. using Infragistics.Win.UltraWinTree;
  18. using Core.Mes.Client.Comm.Server;
  19. using Pur.Pop_upWindow;
  20. using com.hnshituo.pur.vo;
  21. using Pur.configure;
  22. using System.Collections;
  23. using Infragistics.Win.UltraWinToolTip;
  24. namespace Pur.require_plan
  25. {
  26. public partial class FrmPurPlanMat : FrmPmsBase
  27. {
  28. Boolean QClickCellOrQuery = false;//是否点击查询按钮或grid数据单元格,控制是否刷新右侧物料数据,true为不刷新
  29. DataTable dt_Purmatclass = null;
  30. private string QstrItemUnique = "";
  31. UltraTreeNode qUltraNode = null;
  32. public FrmPurPlanMat()
  33. {
  34. InitializeComponent();
  35. }
  36. public FrmPurPlanMat(OpeBase ob)
  37. {
  38. this.ob = ob;
  39. InitializeComponent();
  40. }
  41. public FrmPurPlanMat(OpeBase ob,string strUniQue)
  42. {
  43. this.ob = ob;
  44. QstrItemUnique = strUniQue;
  45. InitializeComponent();
  46. }
  47. /** 物料编码 */
  48. //Column("ITEM_CODE")
  49. private String itemCode;
  50. /** 物料描述 */
  51. //Column("ITEM_DESC")
  52. private String itemDesc;
  53. /** 物料名称 */
  54. //Column("ITEM_NAME")
  55. private String itemName;
  56. /** 物料英文名称 */
  57. //Column("ITEM_DESC_E")
  58. private String itemDescE;
  59. /** 物料检索(拼音助记码) */
  60. //Column("ITEM_IDX")
  61. private String itemIdx;
  62. /** 物料型号规格 */
  63. //Column("ITEM_SPEC")
  64. private String itemSpec;
  65. /** 物料材质 */
  66. //Column("ITEM_MODEL")
  67. private String itemModel;
  68. /** 采购单位(个、袋、桶) */
  69. //Column("ITEM_UOM")
  70. private String itemUom;
  71. /** 转换公式 */
  72. //Column("ITEM_UOM_FORMULA")
  73. private String itemUomFormula;
  74. /** 转换系数 */
  75. //Column("ITEM_UOM_CONEFFICIENT")
  76. private String itemUomConefficient;
  77. /** 库存单位 */
  78. //Column("WEIGHT_UNIT")
  79. private String weightUnit;
  80. /** 计价类型 */
  81. //Column("PRICE_TYPE")
  82. private String priceType;
  83. /** 计划价 */
  84. //Column("BUG_PRICE")
  85. private Double bugPrice;
  86. /** 最近采购价 */
  87. //Column("LAST_PRICE")
  88. private Double lastPrice;
  89. /** 月末移动平均价 */
  90. //Column("MONTH_END_AVG_PRICE")
  91. private Double monthEndAvgPrice;
  92. /** 币种代码 */
  93. //Column("CURRENCY_CODE")
  94. private String currencyCode;
  95. /** 最小采购数量 */
  96. //Column("MIN_QTY")
  97. private Double minQty;
  98. /** 批量数 */
  99. //Column("QTY_MULTIPLE")
  100. private Double qtyMultiple;
  101. /** 有效期 */
  102. //Column("LIFE_CYCLE")
  103. private Double lifeCycle;
  104. /** 采购管理部门代码 */
  105. private String buyerDeptCode;
  106. /** 采购管理部门描叙 */
  107. private String buyerDeptDesc;
  108. /** 采购管理科室代码 */
  109. private String buyerUnitCode;
  110. /** 采购管理科室描叙 */
  111. private String receiveType;
  112. private string itemAttrId;
  113. /// <summary>
  114. /// 属性编码
  115. /// </summary>
  116. public string ItemAttrId
  117. {
  118. set { itemAttrId = value; }
  119. get { return itemAttrId; }
  120. }
  121. private string tenantId;
  122. public string TenantId
  123. {
  124. get { return tenantId; }
  125. set { tenantId = value; }
  126. }
  127. private string tenantName;
  128. public string TenantName
  129. {
  130. get { return tenantName; }
  131. set { tenantName = value; }
  132. }
  133. private string itemAttr;
  134. /// <summary>
  135. /// 属性
  136. /// </summary>
  137. public string ItemAttr
  138. {
  139. set { itemAttr = value; }
  140. get { return itemAttr; }
  141. }
  142. private String buyerUnitDesc;
  143. public String getReceiveType()
  144. {
  145. return this.receiveType;
  146. }
  147. public String getBuyerDeptCode()
  148. {
  149. return this.buyerDeptCode;
  150. }
  151. public String getBuyerDeptDesc()
  152. {
  153. return this.buyerDeptDesc;
  154. }
  155. public String getBuyerUnitCode()
  156. {
  157. return this.buyerUnitCode;
  158. }
  159. public String getBuyerUnitDesc()
  160. {
  161. return this.buyerUnitDesc;
  162. }
  163. public String getItemCode()
  164. {
  165. return this.itemCode;
  166. }
  167. public String getItemDesc()
  168. {
  169. return this.itemDesc;
  170. }
  171. public String getItemName()
  172. {
  173. return this.itemName;
  174. }
  175. public String getItemDescE()
  176. {
  177. return this.itemDescE;
  178. }
  179. public String getItemIdx()
  180. {
  181. return this.itemIdx;
  182. }
  183. public String getItemSpec()
  184. {
  185. return this.itemSpec;
  186. }
  187. public String getItemModel()
  188. {
  189. return this.itemModel;
  190. }
  191. public String getItemUom()
  192. {
  193. return this.itemUom;
  194. }
  195. public String getItemUomFormula()
  196. {
  197. return this.itemUomFormula;
  198. }
  199. public String getItemUomConefficient()
  200. {
  201. return this.itemUomConefficient;
  202. }
  203. public String getWeightUnit()
  204. {
  205. return this.weightUnit;
  206. }
  207. public String getPriceType()
  208. {
  209. return this.priceType;
  210. }
  211. public Double getBugPrice()
  212. {
  213. return this.bugPrice;
  214. }
  215. public Double getLastPrice()
  216. {
  217. return this.lastPrice;
  218. }
  219. public Double getMonthEndAvgPrice()
  220. {
  221. return this.monthEndAvgPrice;
  222. }
  223. public String getCurrencyCode()
  224. {
  225. return this.currencyCode;
  226. }
  227. public Double getMinQty()
  228. {
  229. return this.minQty;
  230. }
  231. public Double getQtyMultiple()
  232. {
  233. return this.qtyMultiple;
  234. }
  235. public Double getLifeCycle()
  236. {
  237. return this.lifeCycle;
  238. }
  239. private String itemUseUom;
  240. public String getItemUseUom()
  241. {
  242. return this.itemUseUom;
  243. }
  244. private string itemUnique;
  245. /// <summary>
  246. /// 唯一值标识
  247. /// </summary>
  248. public string ItemUnique
  249. {
  250. get { return itemUnique; }
  251. set { itemUnique = value; }
  252. }
  253. //-----------------------------------------属性
  254. private string itemAttrCode;
  255. /// <summary>
  256. /// 属性编码
  257. /// </summary>
  258. public string ItemAttrCode
  259. {
  260. set { itemAttrCode = value; }
  261. get { return itemAttrCode; }
  262. }
  263. //-----------------------------------------标准编号
  264. private string itemStandardsId;
  265. /// <summary>
  266. /// 主键ID
  267. /// </summary>
  268. public string ItemStandardsId
  269. {
  270. set { itemStandardsId = value; }
  271. get { return itemStandardsId; }
  272. }
  273. private string standardsId;
  274. /// <summary>
  275. /// 采购标准ID
  276. /// </summary>
  277. public string StandardsId
  278. {
  279. set { standardsId = value; }
  280. get { return standardsId; }
  281. }
  282. private string standardsCode;
  283. /// <summary>
  284. /// 采购标准编号
  285. /// </summary>
  286. public string StandardsCode
  287. {
  288. set { standardsCode = value; }
  289. get { return standardsCode; }
  290. }
  291. //-------------------------------------------单位
  292. private string weightUnitCode;
  293. /// <summary>
  294. /// 库存单位编码
  295. /// </summary>
  296. public string WeightUnitCode
  297. {
  298. set { weightUnitCode = value; }
  299. get { return weightUnitCode; }
  300. }
  301. private string itemUomId;
  302. /// <summary>
  303. /// 主键
  304. /// </summary>
  305. public string ItemUomId
  306. {
  307. set { itemUomId = value; }
  308. get { return itemUomId; }
  309. }
  310. private string uomCode;
  311. /// <summary>
  312. /// 采购单位编码
  313. /// </summary>
  314. public string UomCode
  315. {
  316. set { uomCode = value; }
  317. get { return uomCode; }
  318. }
  319. private string uomName;
  320. /// <summary>
  321. /// 采购单位名称
  322. /// </summary>
  323. public string UomName
  324. {
  325. set { uomName = value; }
  326. get { return uomName; }
  327. }
  328. private string isBudgetCtrl;
  329. /// <summary>
  330. /// 是否定额控制(1是,0否)
  331. /// </summary>
  332. public string IsBudgetCtrl
  333. {
  334. set { isBudgetCtrl = value; }
  335. get { return isBudgetCtrl; }
  336. }
  337. private void FrmPurPlanMat_Load(object sender, EventArgs e)
  338. {
  339. GridHelper.SetExcludeColumnsActive(ultraGrid1.DisplayLayout.Bands[0]);
  340. GridHelper.SetExcludeColumnsActive(ultraGrid4.DisplayLayout.Bands[0]);
  341. GridHelper.SetExcludeColumnsActive(ultraGrid5.DisplayLayout.Bands[0]);
  342. GridHelper.SetExcludeColumnsActive(ultraGrid7.DisplayLayout.Bands[0]);
  343. GridHelper.SetExcludeColumnsActive(ultraGrid7.DisplayLayout.Bands[1],"Check");
  344. cmbNum.SelectedIndex = 0;
  345. string[] strItemUniques = QstrItemUnique.Split('@');
  346. if (strItemUniques[0].Trim() != "")
  347. {
  348. txt_wlbm.Text = strItemUniques[0].Trim();
  349. }
  350. GetPUR_MAT_Class();
  351. }
  352. /// <summary>
  353. /// 查询物料分类和物料
  354. /// </summary>
  355. public void GetPUR_MAT_Class()
  356. {
  357. //查询物料分类
  358. ultraGrid1.DisplayLayout.Bands[0].Override.AllowUpdate = DefaultableBoolean.False;
  359. PurmatclassEntity matclassEntity = new PurmatclassEntity();
  360. matclassEntity.UpdateUserid = this.UserInfo.GetDeptid();
  361. DataTable dt = this.execute<DataTable>("com.hnshituo.pur.configure.service.MatClassService", "getMatClass", new object[] { matclassEntity });
  362. dt_Purmatclass = dt;
  363. getultree(dt);//绑定物料分类表
  364. //查询物料
  365. MatEntity mat = new MatEntity();
  366. mat.Validflag = "1";
  367. //物料分类
  368. if (checkBox1.Checked)
  369. {
  370. mat.UpdateName = txt_ARC_CODE.Text;
  371. }
  372. mat.ItemCode = txt_wlbm.Text;
  373. if (ultraTextEditor3.Text.Trim() != "")
  374. {
  375. mat.DeleteName = ultraTextEditor3.Text;
  376. }
  377. mat.ItemName = txt_wlmc.Text;
  378. getMat(mat);
  379. //DataTable dt = this.execute<DataTable>("com.hnshituo.pur.configure.service.MatService","findAll",new object[] { });
  380. //GridHelper.CopyDataToDatatable(dt,dataTable1,true);
  381. }
  382. private void ultraButton3_Click(object sender, EventArgs e)
  383. {
  384. Pur.Entity.configureEntity.MatEntity mAT = new MatEntity();
  385. mAT.ItemCode = txt_wlbm.Text;
  386. mAT.ItemName = txt_wlmc.Text;
  387. mAT.Validflag = "1";
  388. DataTable dt = this.execute<DataTable>("com.hnshituo.pur.configure.service.MatService", "getMat", new object[] { mAT });
  389. GridHelper.CopyDataToDatatable(dt, dataTable1, true);
  390. }
  391. /// <summary>
  392. /// 获取物料分类树形结构
  393. /// </summary>
  394. public void getultree(DataTable dt)
  395. {
  396. ulTreeMat.Nodes.Clear();
  397. if (dt == null || dt.Rows.Count < 1)
  398. {
  399. return;
  400. }
  401. dt_Purmatclass = dt;//保存物料分类全局变量
  402. DataTable dt_A = new DataTable();//物料分类
  403. //筛选出根节点
  404. DataRow[] rows = dt.Select("PARENTCODE='' or PARENTCODE is null");
  405. dt_A = dt.Clone(); //克隆A的结构
  406. foreach (DataRow row in rows)
  407. {
  408. dt_A.ImportRow(row);//复制行数据
  409. }
  410. //添加物料大类
  411. for (int j = 0; j < dt_A.Rows.Count; j++)
  412. {
  413. UltraTreeNode Ultnode = ulTreeMat.Nodes.Add(dt_A.Rows[j]["BASECODE"].ToString(), dt_A.Rows[j]["BASENAME"].ToString());
  414. getChildNodes(Ultnode);
  415. }
  416. }
  417. /// <summary>
  418. /// 查询物料
  419. /// </summary>
  420. private void getMat(MatEntity mat)
  421. {
  422. if (mat != null)
  423. {
  424. if (cmbNum.Value != null && cmbNum.Value.ToString() != "")
  425. {
  426. mat.ItemUomConefficient = double.Parse(cmbNum.Value.ToString());
  427. }
  428. }
  429. mat.UpdateUserid = this.UserInfo.GetDeptid();
  430. DataTable dt_mat = this.execute<DataTable>("com.hnshituo.pur.configure.service.MatService", "getMat", new object[] { mat });
  431. dataTable1.Rows.Clear();
  432. GridHelper.CopyDataToDatatable(ref dt_mat, ref dataTable1, true);//绑定物料分类表
  433. if (ultraGrid1.Rows.Count == 0)
  434. {
  435. dataTable6.Rows.Clear();
  436. dataTable7.Rows.Clear();
  437. dataTable8.Rows.Clear();//清空dataTable5之前先清空dataTable8
  438. dataTable5.Rows.Clear();
  439. }
  440. }
  441. /// <summary>
  442. /// 递归查询父节点下的所有子节点
  443. /// </summary>
  444. /// <param name="Tnode"></param>
  445. public void getChildNodes(UltraTreeNode Tnode)
  446. {
  447. DataTable dt_A = dt_Purmatclass.Clone();//物料分类
  448. DataRow[] rows = dt_Purmatclass.Select("PARENTCODE='" + Tnode.Key + "'");
  449. foreach (DataRow row in rows)
  450. {
  451. dt_A.ImportRow(row);//复制行数据
  452. }
  453. //添加物料分类
  454. for (int j = 0; j < dt_A.Rows.Count; j++)
  455. {
  456. UltraTreeNode Ultnode = Tnode.Nodes.Add(dt_A.Rows[j]["BASECODE"].ToString(), dt_A.Rows[j]["BASENAME"].ToString());
  457. getChildNodes(Ultnode);//利用递归将当前节点的子节点添加进去
  458. }
  459. }
  460. private void ulTreeMat_AfterActivate(object sender, NodeEventArgs e)
  461. {
  462. if (!QClickCellOrQuery)//如果不是点击查询按钮或单击grig行数据,刷新右侧数据
  463. {
  464. MatEntity eMat = new MatEntity();
  465. ulTreeMat.ActiveNode.Expanded = true;
  466. qUltraNode = ulTreeMat.ActiveNode;
  467. eMat.ArcCode = qUltraNode.Key;
  468. eMat.Validflag = "1";
  469. getMat(eMat);
  470. }
  471. txt_ARC_CODE.Text = ulTreeMat.ActiveNode.Key;
  472. txt_ARC_ITEM.Text = ulTreeMat.ActiveNode.Text;
  473. }
  474. private void ultraButton1_Click_1(object sender, EventArgs e)
  475. {
  476. UltraGridRow uge = ultraGrid1.ActiveRow;
  477. if (uge == null)
  478. {
  479. MessageUtil.ShowTips("请选择一条物料!");
  480. return;
  481. }
  482. this.itemCode = uge.Cells["itemCode"].Value.ToString();
  483. this.itemDesc = uge.Cells["itemDesc"].Value.ToString();
  484. this.itemName = uge.Cells["itemName"].Value.ToString();
  485. this.itemSpec = uge.Cells["itemSpec"].Value.ToString();
  486. this.itemModel = uge.Cells["itemModel"].Value.ToString();
  487. this.itemUom = uge.Cells["itemUom"].Value.ToString();
  488. this.itemUomConefficient = uge.Cells["itemUomConefficient"].Value.ToString();
  489. this.itemUomFormula = uge.Cells["itemUomFormula"].Value.ToString();
  490. this.weightUnit = uge.Cells["weightUnit"].Value.ToString();
  491. this.bugPrice = Convert.ToDouble(uge.Cells["bugPrice"].Value.ToString());
  492. this.priceType = uge.Cells["priceType"].Value.ToString();
  493. this.itemUseUom = uge.Cells["itemUseUom"].Value.ToString();
  494. this.buyerDeptCode = uge.Cells["buyerDeptCode"].Value.ToString();
  495. this.buyerDeptDesc = uge.Cells["buyerDeptDesc"].Value.ToString();
  496. this.buyerUnitCode = uge.Cells["buyerUnitCode"].Value.ToString();
  497. this.buyerUnitDesc = uge.Cells["buyerUnitDesc"].Value.ToString();
  498. this.receiveType = uge.Cells["receiveType"].Value.ToString();
  499. this.Close();
  500. return;
  501. }
  502. private void ultraButton2_Click(object sender, EventArgs e)
  503. {
  504. this.Close();
  505. }
  506. private void barsManagerButon_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
  507. {
  508. switch (e.Tool.Key.ToString())
  509. {
  510. case "Query":
  511. {
  512. QClickCellOrQuery = true;
  513. GetPUR_MAT_Class();
  514. if (ultraGrid1.Rows.Count > 0)
  515. {
  516. ulTreeMat.CollapseAll();
  517. UltraTreeNode uttNode = ulTreeMat.GetNodeByKey(ultraGrid1.Rows[0].Cells["ARCCODE"].Value.ToString());
  518. ulTreeMat.ActiveNode = uttNode;
  519. if (uttNode == null)
  520. {
  521. MessageUtil.ShowTips("物料名称:" + ultraGrid1.Rows[0].Cells["ITEMNAME"].Value.ToString() + " 未找到相应的分类:" + ultraGrid1.Rows[0].Cells["ARCCODE"].Value.ToString());
  522. }
  523. else
  524. {
  525. while (ulTreeMat.ActiveNode != uttNode)
  526. {
  527. ulTreeMat.ActiveNode = uttNode;
  528. }
  529. uttNode.Expanded = true;
  530. //展开分类
  531. while (uttNode.Parent != null)
  532. {
  533. uttNode = uttNode.Parent;
  534. uttNode.Expanded = true;
  535. }
  536. }
  537. QClickCellOrQuery = false;//设置未点击
  538. }
  539. //Pur.Entity.configureEntity.MatEntity mAT = new MatEntity();
  540. //mAT.ItemCode = txt_wlbm.Text;
  541. //if (ultraTextEditor3.Text.Trim() != "")
  542. //{
  543. // mAT.DeleteName = ultraTextEditor3.Text;
  544. //}
  545. //mAT.ItemName = txt_wlmc.Text;
  546. //mAT.Validflag = "1";
  547. //getMat(mAT);
  548. }
  549. break;
  550. case "conFirmation":
  551. {
  552. ultraGrid7.UpdateData();
  553. UltraGridRow uge = null;
  554. UltraGridRow uge1 = ultraGrid1.ActiveRow;
  555. //UltraGridRow[] uge3 = new UltraGridRow[dataTable5.Rows.Count];//属性
  556. //ArrayList alAttr = new ArrayList();
  557. //string[] attr = new string[3];
  558. //foreach (UltraGridRow ugr in ultraGrid7.Rows)
  559. //{
  560. // if (ugr.HasParent() && (bool)ugr.Cells["Check"].Value)
  561. // {
  562. // attr[0] = ugr.Cells["itemAttr"].Value.ToString();
  563. // attr[1] = ugr.Cells["ITEMATTRCODE"].Value.ToString();
  564. // attr[2] = ugr.Cells["itemAttrId"].Value.ToString();
  565. // alAttr.Add(attr);
  566. // }
  567. //}
  568. UltraGridRow uge4 = ultraGrid4.ActiveRow;//标准编号
  569. UltraGridRow uge5 = ultraGrid5.ActiveRow;//单位
  570. if (uge5 != null)//采购单位
  571. {
  572. this.itemUomId = uge5.Cells["itemUomId"].Value.ToString();
  573. this.weightUnit = uge5.Cells["weightUnit"].Value.ToString();
  574. if (string.IsNullOrEmpty(this.weightUnit))
  575. {
  576. MessageUtil.ShowTips("所选物料采购单位的库存单位不能为空值,请重新选择!");
  577. return;
  578. }
  579. this.weightUnitCode = uge5.Cells["weightUnitCode"].Value.ToString();
  580. this.itemUomConefficient = uge5.Cells["itemUomConefficient"].Value.ToString();
  581. double b_itemUomConefficient = 0;
  582. if (!double.TryParse(this.itemUomConefficient = uge5.Cells["itemUomConefficient"].Value.ToString(), out b_itemUomConefficient))
  583. {
  584. MessageUtil.ShowTips("所选物料采购单位转换系数必须>0,请重新选择!");
  585. return;
  586. }
  587. if (!(b_itemUomConefficient > 0))
  588. {
  589. MessageUtil.ShowTips("所选物料采购单位转换系数必须>0,请重新选择!");
  590. return;
  591. }
  592. this.uomCode = uge5.Cells["uomCode"].Value.ToString();
  593. this.uomName = uge5.Cells["uomName"].Value.ToString();
  594. if (string.IsNullOrEmpty(this.uomName))
  595. {
  596. MessageUtil.ShowTips("所选物料采购单位的库存单位不能为空值,请重新选择!");
  597. return;
  598. }
  599. }
  600. else
  601. {
  602. MessageUtil.ShowTips("此物料没有维护单位信息,不能选择");
  603. return;
  604. }
  605. if (uge1 == null)
  606. {
  607. MessageUtil.ShowTips("没有数据可选!");
  608. return;
  609. }
  610. else
  611. {
  612. uge = uge1;
  613. this.itemCode = uge.Cells["itemCode"].Value.ToString();
  614. this.itemDesc = uge.Cells["itemDesc"].Value.ToString();
  615. this.itemName = uge.Cells["itemName"].Value.ToString();
  616. this.itemSpec = uge.Cells["itemSpec"].Value.ToString();
  617. this.itemModel = uge.Cells["itemModel"].Value.ToString();
  618. String strArcCode= uge.Cells["ARCCODE"].Value.ToString();
  619. PurmatclassEntity matclass1 = this.execute<PurmatclassEntity>("com.hnshituo.pur.configure.service.MatClassService", "findById", new object[] { strArcCode });
  620. if (matclass1 == null)
  621. {
  622. MessageUtil.ShowTips("未发现该物料分类信息!");
  623. return;
  624. }
  625. if (String.IsNullOrEmpty(matclass1.TenantId))
  626. {
  627. MessageUtil.ShowTips("该物料未维护审批流程!");
  628. return;
  629. }
  630. this.tenantId = matclass1.TenantId;
  631. this.TenantName = matclass1.TenantName;
  632. this.itemUomFormula = uge.Cells["itemUomFormula"].Value.ToString();
  633. this.weightUnit = uge.Cells["weightUnit"].Value.ToString();
  634. this.bugPrice = Convert.ToDouble(uge.Cells["bugPrice"].Value.ToString());
  635. this.priceType = uge.Cells["priceType"].Value.ToString();
  636. this.buyerDeptCode = uge.Cells["buyerDeptCode"].Value.ToString();
  637. this.buyerDeptDesc = uge.Cells["buyerDeptDesc"].Value.ToString();
  638. this.buyerUnitCode = uge.Cells["buyerUnitCode"].Value.ToString();
  639. this.buyerUnitDesc = uge.Cells["buyerUnitDesc"].Value.ToString();
  640. this.receiveType = uge.Cells["receiveType"].Value.ToString();
  641. this.isBudgetCtrl = uge.Cells["isBudgetCtrl"].Value.ToString();
  642. //this.itemUseUom = uge.Cells["itemUseUom"].Value.ToString();
  643. //this.itemUom = uge.Cells["itemUom"].Value.ToString();
  644. //this.itemUomConefficient = uge.Cells["itemUomConefficient"].Value.ToString();
  645. if (ultraTextEditor4.Text.Trim() != "")//属性
  646. {
  647. this.itemAttr = ultraTextEditor4.Text;//属性名称
  648. this.itemAttrCode = ultraTextEditor5.Text;//属性编码
  649. this.itemAttrId = ultraTextEditor6.Text;//属性Id
  650. //for (int i = 0; i < alAttr.Count; i++)
  651. //{
  652. // string[] strAttr = (string[])alAttr[i];
  653. // this.itemAttr += strAttr[0];
  654. // this.itemAttrCode += strAttr[1];
  655. // this.itemAttrId += strAttr[2];
  656. // if (i != alAttr.Count - 1)
  657. // {
  658. // this.itemAttr += ";";
  659. // this.itemAttrCode += ";";
  660. // this.itemAttrId += ";";
  661. // }
  662. //}
  663. }
  664. else
  665. {
  666. this.itemAttr = "";
  667. this.itemAttrCode = "";
  668. this.itemAttrId = "";
  669. }
  670. if (uge4 != null)//标准编号
  671. {
  672. this.itemStandardsId = uge4.Cells["itemStandardsId"].Value.ToString();
  673. this.standardsId = uge4.Cells["standardsId"].Value.ToString();
  674. this.standardsCode = uge4.Cells["standardsCode"].Value.ToString();
  675. }
  676. else
  677. {
  678. this.itemStandardsId = "";
  679. this.standardsId = "";
  680. this.standardsCode = "";
  681. }
  682. //所选物料唯一标识值
  683. this.ItemUnique = this.itemCode + "@" + this.itemAttrId + "@" + this.itemStandardsId + "@" + this.itemUomId;
  684. }
  685. this.Close();
  686. return;
  687. }
  688. case "ESC":
  689. {
  690. this.Close();
  691. }
  692. break;
  693. }
  694. }
  695. /// <summary>
  696. /// 激活物料
  697. /// </summary>
  698. /// <param name="sender"></param>
  699. /// <param name="e"></param>
  700. private void ultraGrid1_AfterRowActivate(object sender, EventArgs e)
  701. {
  702. getItemAttr();//获取物料属性
  703. getMatStandard();// 获取物料标准编号
  704. getMatUOM();// 获取单位转换
  705. string[] strItemUniques = QstrItemUnique.Split('@');
  706. if (QstrItemUnique != "")
  707. {
  708. QClickCellOrQuery = true;//不刷新右侧物料数据
  709. if (strItemUniques.Length == 4)
  710. {
  711. //if(strItemUniques[0].Trim()!="")
  712. //comm.doActiveSelRow(ultraGrid1, "ITEMCODE", strItemUniques[0]);//激活物料
  713. if (strItemUniques[2].Trim() != "")
  714. comm.doActiveSelRow(ultraGrid4, "itemStandardsId", strItemUniques[2]);//激活标准编号
  715. if (strItemUniques[3].Trim() != "")
  716. comm.doActiveSelRow(ultraGrid5, "itemUomId", strItemUniques[3]);//激活采购单位
  717. //选中属性
  718. if (strItemUniques[1].Trim() != "")
  719. {
  720. //显示所选属性
  721. strItemUniques[1] += ";";
  722. strItemUniques[1] = ";" + strItemUniques[1];
  723. for (int i = 0; i < ultraGrid7.Rows.Count; i++)
  724. {
  725. foreach (UltraGridRow ugr in ultraGrid7.Rows[i].ChildBands[0].Rows)
  726. {
  727. if (strItemUniques[1].Contains(ugr.Cells["itemAttrId"].Value.ToString()))
  728. {
  729. ugr.Cells["Check"].Value = true;
  730. ultraTextEditor4.Text += ultraGrid7.Rows[i].Cells["itemAttrClassName"].Value.ToString() + ":" + ugr.Cells["itemAttr"].Value.ToString() + "; ";
  731. ultraTextEditor5.Text += ugr.Cells["ITEMATTRCODE"].Value.ToString() + ";";
  732. ultraTextEditor6.Text += ugr.Cells["itemAttrId"].Value.ToString() + ";";
  733. }
  734. }
  735. }
  736. if (ultraTextEditor4.Text != "")
  737. {
  738. ultraTextEditor4.Text = ultraTextEditor4.Text.Remove(ultraTextEditor4.Text.Length - 2);
  739. ultraTextEditor5.Text = ultraTextEditor5.Text.Remove(ultraTextEditor5.Text.Length - 1);
  740. ultraTextEditor6.Text = ultraTextEditor6.Text.Remove(ultraTextEditor6.Text.Length - 1);
  741. }
  742. }
  743. }
  744. QstrItemUnique = "";
  745. QClickCellOrQuery = false;
  746. //激活右侧节点
  747. UltraTreeNode uttNode = ulTreeMat.GetNodeByKey(ultraGrid1.ActiveRow.Cells["ARCCODE"].Value.ToString());
  748. if (ulTreeMat.ActiveNode == uttNode)
  749. {
  750. return;
  751. }
  752. ulTreeMat.CollapseAll();
  753. QClickCellOrQuery = true;
  754. ulTreeMat.ActiveNode = uttNode;
  755. if (uttNode == null)
  756. {
  757. MessageUtil.ShowTips("物料名称:" + ultraGrid1.ActiveRow.Cells["ITEMNAME"].Value.ToString() + " 未找到相应的分类:" + ultraGrid1.ActiveRow.Cells["ARCCODE"].Value.ToString());
  758. }
  759. else
  760. {
  761. while (ulTreeMat.ActiveNode != uttNode)
  762. {
  763. ulTreeMat.ActiveNode = uttNode;
  764. }
  765. uttNode.Expanded = true;
  766. //展开分类
  767. while (uttNode.Parent != null)
  768. {
  769. uttNode = uttNode.Parent;
  770. uttNode.Expanded = true;
  771. }
  772. }
  773. QClickCellOrQuery = false;//设置未点击
  774. }
  775. }
  776. /// <summary>
  777. /// 获取物料属性
  778. /// </summary>
  779. /// <param name="parm"></param>
  780. private void getItemAttr()
  781. {
  782. //清空所选属性
  783. ultraTextEditor4.Text = "";
  784. ultraTextEditor5.Text = "";
  785. ultraTextEditor6.Text = "";
  786. //查询属性父表
  787. dataTable8.Rows.Clear(); //清空子表
  788. PurMatAttrsEntity MatAttrsEntity = new PurMatAttrsEntity();
  789. MatAttrsEntity.ItemCode = ultraGrid1.ActiveRow.Cells["ITEMCODE"].Value.ToString();
  790. DataTable dt = this.execute<DataTable>("com.hnshituo.pur.configure.service.MatAttrsService", "getMatAttrClass", new object[] { MatAttrsEntity });
  791. GridHelper.CopyDataToDatatable(ref dt, ref dataTable5, true);//获取物料属性
  792. //查询属性字表
  793. //dataTable5.Rows.Clear();
  794. Dictionary<string, object> param = new Dictionary<string, object>();
  795. param.Add("ItemCode", ultraGrid1.ActiveRow.Cells["ITEMCODE"].Value.ToString());
  796. param.Add("Validflag", "1");
  797. DataTable dt_mat = this.execute<DataTable>("com.hnshituo.pur.configure.service.MatAttrsService", "find", new object[] { param, 0, 0 });
  798. //按是否常用排序
  799. //if (dt_mat.Rows.Count > 1)
  800. //{
  801. // dt_mat.DefaultView.Sort = "ISDEFAULT DESC";
  802. // dt_mat = dt_mat.DefaultView.ToTable();
  803. //}
  804. for (int i = 0; i < dt_mat.Rows.Count; i++)
  805. {
  806. if (dt_mat.Rows[i]["ISDEFAULT"].ToString() == "1")
  807. {
  808. dt_mat.Rows[i]["ISDEFAULT"] = "是";
  809. }
  810. else if (dt_mat.Rows[i]["ISDEFAULT"].ToString() == "0")
  811. {
  812. dt_mat.Rows[i]["ISDEFAULT"] = "否";
  813. }
  814. }
  815. GridHelper.CopyDataToDatatable(ref dt_mat, ref dataTable8, true);//获取物料属性
  816. }
  817. /// <summary>
  818. /// 获取物料标准编号
  819. /// </summary>
  820. private void getMatStandard()
  821. {
  822. dataTable6.Rows.Clear();
  823. if (ultraGrid1.ActiveRow != null)
  824. {
  825. PurMatStandardsEntity PurMatStandards_Entity = new PurMatStandardsEntity();
  826. PurMatStandards_Entity.Validflag = "1";
  827. PurMatStandards_Entity.ItemCode = ultraGrid1.ActiveRow.Cells["ITEMCODE"].Value.ToString();
  828. DataTable dt_matStandards = this.execute<DataTable>("com.hnshituo.pur.configure.service.MatStandardsService", "find", new object[] { PurMatStandards_Entity, 0, 0 });
  829. //按是否常用排序
  830. if (dt_matStandards.Rows.Count > 1)
  831. {
  832. dt_matStandards.DefaultView.Sort = "ISDEFAULT DESC";
  833. dt_matStandards = dt_matStandards.DefaultView.ToTable();
  834. }
  835. for (int i = 0; i < dt_matStandards.Rows.Count; i++)
  836. {
  837. if (dt_matStandards.Rows[i]["ISDEFAULT"].ToString() == "1")
  838. {
  839. dt_matStandards.Rows[i]["ISDEFAULT"] = "是";
  840. }
  841. else if (dt_matStandards.Rows[i]["ISDEFAULT"].ToString() == "0")
  842. {
  843. dt_matStandards.Rows[i]["ISDEFAULT"] = "否";
  844. }
  845. }
  846. GridHelper.CopyDataToDatatable(ref dt_matStandards, ref dataTable6, true);//绑定物料规格
  847. }
  848. }
  849. /// <summary>
  850. /// 获取单位转换
  851. /// </summary>
  852. private void getMatUOM()
  853. {
  854. dataTable7.Rows.Clear();
  855. if (ultraGrid1.ActiveRow != null)
  856. {
  857. PurMatUomsEntity MatUomsEntity = new PurMatUomsEntity();
  858. MatUomsEntity.ItemCode = ultraGrid1.ActiveRow.Cells["ITEMCODE"].Value.ToString();
  859. MatUomsEntity.Validflag = "1";
  860. DataTable dt_matUOM = this.execute<DataTable>("com.hnshituo.pur.configure.service.MatUomsService", "find", new object[] { MatUomsEntity, 0, 0 });
  861. //按是否常用排序
  862. if (dt_matUOM.Rows.Count > 1)
  863. {
  864. dt_matUOM.DefaultView.Sort = "ISDEFAULT DESC";
  865. dt_matUOM = dt_matUOM.DefaultView.ToTable();
  866. }
  867. for (int i = 0; i < dt_matUOM.Rows.Count; i++)
  868. {
  869. if (dt_matUOM.Rows[i]["ISDEFAULT"].ToString() == "1")
  870. {
  871. dt_matUOM.Rows[i]["ISDEFAULT"] = "是";
  872. }
  873. else if (dt_matUOM.Rows[i]["ISDEFAULT"].ToString() == "0")
  874. {
  875. dt_matUOM.Rows[i]["ISDEFAULT"] = "否";
  876. }
  877. }
  878. GridHelper.CopyDataToDatatable(ref dt_matUOM, ref dataTable7, true);//绑定物料规格
  879. }
  880. }
  881. /// <summary>
  882. /// 选择属性
  883. /// </summary>
  884. /// <param name="sender"></param>
  885. /// <param name="e"></param>
  886. private void ultraGrid3_CellChange(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
  887. {
  888. ultraGrid3.UpdateData();
  889. if (e.Cell.Column.Key == "Check")
  890. {
  891. //设置单选
  892. if (e.Cell.Row.HasParent() && (bool)e.Cell.Value)
  893. {
  894. foreach (UltraGridRow ugr in e.Cell.Row.ParentRow.ChildBands[0].Rows)
  895. {
  896. if (ugr != e.Cell.Row)
  897. {
  898. ugr.Cells["Check"].Value = false;
  899. }
  900. }
  901. }
  902. }
  903. }
  904. /// <summary>
  905. /// 选择标准编号
  906. /// </summary>
  907. /// <param name="sender"></param>
  908. /// <param name="e"></param>
  909. private void ultraGrid4_CellChange(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
  910. {
  911. ultraGrid4.UpdateData();
  912. if (e.Cell.Column.Key == "Check")
  913. {
  914. if ((bool)e.Cell.Value)
  915. {
  916. foreach (UltraGridRow ugr in ultraGrid4.Rows)
  917. {
  918. if (ugr != e.Cell.Row)
  919. {
  920. ugr.Cells["Check"].Value = false;
  921. }
  922. }
  923. }
  924. }
  925. }
  926. /// <summary>
  927. /// 选择采购标准
  928. /// </summary>
  929. /// <param name="sender"></param>
  930. /// <param name="e"></param>
  931. private void ultraGrid5_CellChange(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
  932. {
  933. ultraGrid5.UpdateData();
  934. if (e.Cell.Column.Key == "Check")
  935. {
  936. if ((bool)e.Cell.Value)
  937. {
  938. foreach (UltraGridRow ugr in ultraGrid5.Rows)
  939. {
  940. if (ugr != e.Cell.Row)
  941. {
  942. ugr.Cells["Check"].Value = false;
  943. }
  944. }
  945. }
  946. }
  947. }
  948. /// <summary>
  949. /// 选择属性
  950. /// </summary>
  951. /// <param name="sender"></param>
  952. /// <param name="e"></param>
  953. private void ultraTextEditor1_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
  954. {
  955. FrmPopAttrs frm = new FrmPopAttrs(this.ob);
  956. frm.ShowDialog();
  957. if (frm.QstrItemAttr == "")
  958. {
  959. return;
  960. }
  961. ultraTextEditor1.Text = frm.QstrItemAttr;
  962. ultraTextEditor2.Text = frm.QstrItemAttrCode;
  963. }
  964. /// <summary>
  965. /// 添加属性
  966. /// </summary>
  967. /// <param name="sender"></param>
  968. /// <param name="e"></param>
  969. private void ultraButton1_Click(object sender, EventArgs e)
  970. {
  971. if (MessageUtil.ShowYesNoAndQuestion("确认添加属性?").Equals(DialogResult.Yes))
  972. {
  973. if (ultraTextEditor2.Text.Trim() == "")
  974. {
  975. MessageUtil.ShowTips("请选择属性");
  976. return;
  977. }
  978. PurMatAttrsEntity mat_entity = new PurMatAttrsEntity();
  979. mat_entity.ItemAttr = ultraTextEditor2.Text.Trim();//属性名称
  980. mat_entity.Validflag = "1";
  981. if (isExsitRow("com.hnshituo.pur.configure.service.MatAttrsService", mat_entity) > 0)
  982. {
  983. MessageUtil.ShowTips("添加失败 数据库中已经存在所选物料相同的属性编码");
  984. return;
  985. }
  986. mat_entity.ItemCode = ultraGrid1.ActiveRow.Cells["ITEMCODE"].Value.ToString();
  987. mat_entity.ItemAttrCode = ultraTextEditor1.Text;//属性编码
  988. mat_entity.ItemAttrId = this.execute<string>("com.hnshituo.pur.utils.service.UtilsService", "getMaxSeq", new object[] { "PUR_MAT_ATTRS", "ITEM_ATTR_ID" });//属性ID
  989. mat_entity.IsDefault = "0";//是否常用
  990. mat_entity.CreateTime = System.DateTime.Now;//创建时间
  991. mat_entity.CreateName = UserInfo.GetUserName();
  992. mat_entity.CreateUserid = UserInfo.GetUserID();
  993. CoreResult crt = this.execute<CoreResult>("com.hnshituo.pur.configure.service.MatAttrsService", "doInsert", new object[] { mat_entity });//添加操作
  994. if (crt.Resultcode != 0)
  995. {
  996. MessageUtil.ShowTips("添加失败 " + crt.Resultmsg);
  997. return;
  998. }
  999. MessageUtil.ShowTips("添加成功!");
  1000. getItemAttr();//查询规格
  1001. ConfigureClassCommon.doActiveSelRow(ultraGrid3, "ITEMATTRID", mat_entity.ItemAttrId);//激活当前行
  1002. }
  1003. }
  1004. /// <summary>
  1005. /// 判断数据库中是否存在相同的列
  1006. /// </summary>
  1007. /// <param name="strJavaPackName"></param>
  1008. /// <param name="o"></param>
  1009. /// <returns>true存在</returns>
  1010. public int isExsitRow(string strJavaPackName, object o)
  1011. {
  1012. DataTable dt = this.execute<DataTable>(strJavaPackName, "find", new object[] { o, 0, 0 });
  1013. if (dt != null && dt.Rows.Count > 0)//存在相同的行
  1014. {
  1015. return dt.Rows.Count;
  1016. }
  1017. return 0;
  1018. }
  1019. /// <summary>
  1020. /// 选择属性
  1021. /// </summary>
  1022. /// <param name="sender"></param>
  1023. /// <param name="e"></param>
  1024. private void ultraGrid7_CellChange(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
  1025. {
  1026. ultraGrid7.UpdateData();
  1027. if (e.Cell.Column.Key == "Check")
  1028. {
  1029. if ((bool)e.Cell.Value)
  1030. {
  1031. foreach (UltraGridRow ugr in e.Cell.Row.ParentRow.ChildBands[0].Rows)
  1032. {
  1033. if (ugr != e.Cell.Row)
  1034. {
  1035. ugr.Cells["Check"].Value = false;
  1036. }
  1037. }
  1038. }
  1039. //显示所选属性
  1040. ultraTextEditor4.Text = "";
  1041. ultraTextEditor5.Text = "";
  1042. ultraTextEditor6.Text = "";
  1043. for (int i = 0; i < ultraGrid7.Rows.Count; i++)
  1044. {
  1045. foreach (UltraGridRow ugr in ultraGrid7.Rows[i].ChildBands[0].Rows)
  1046. {
  1047. if ((bool)ugr.Cells["Check"].Value)
  1048. {
  1049. ultraTextEditor4.Text += ultraGrid7.Rows[i].Cells["itemAttrClassName"].Value.ToString() + ":" + ugr.Cells["itemAttr"].Value.ToString() + "; ";
  1050. ultraTextEditor5.Text += ugr.Cells["ITEMATTRCODE"].Value.ToString() + ";";
  1051. ultraTextEditor6.Text += ugr.Cells["itemAttrId"].Value.ToString() + ";";
  1052. }
  1053. }
  1054. }
  1055. if (ultraTextEditor4.Text != "")
  1056. {
  1057. ultraTextEditor4.Text = ultraTextEditor4.Text.Remove(ultraTextEditor4.Text.Length - 2);
  1058. ultraTextEditor5.Text = ultraTextEditor5.Text.Remove(ultraTextEditor5.Text.Length - 1);
  1059. ultraTextEditor6.Text = ultraTextEditor6.Text.Remove(ultraTextEditor6.Text.Length - 1);
  1060. }
  1061. }
  1062. }
  1063. /// <summary>
  1064. /// 单击物料单元格
  1065. /// </summary>
  1066. /// <param name="sender"></param>
  1067. /// <param name="e"></param>
  1068. private void ultraGrid1_ClickCell(object sender, ClickCellEventArgs e)
  1069. {
  1070. UltraTreeNode uttNode = ulTreeMat.GetNodeByKey(e.Cell.Row.Cells["ARCCODE"].Value.ToString());
  1071. if (ulTreeMat.ActiveNode == uttNode)
  1072. {
  1073. return;
  1074. }
  1075. ulTreeMat.CollapseAll();
  1076. QClickCellOrQuery = true;
  1077. ulTreeMat.ActiveNode = uttNode;
  1078. if (uttNode == null)
  1079. {
  1080. MessageUtil.ShowTips("物料名称:" + e.Cell.Row.Cells["ITEMNAME"].Value.ToString() + " 未找到相应的分类:" + e.Cell.Row.Cells["ARCCODE"].Value.ToString());
  1081. }
  1082. else
  1083. {
  1084. while (ulTreeMat.ActiveNode != uttNode)
  1085. {
  1086. ulTreeMat.ActiveNode = uttNode;
  1087. }
  1088. uttNode.Expanded = true;
  1089. //展开分类
  1090. while (uttNode.Parent != null)
  1091. {
  1092. uttNode = uttNode.Parent;
  1093. uttNode.Expanded = true;
  1094. }
  1095. }
  1096. QClickCellOrQuery = false;//设置未点击
  1097. }
  1098. private void ultraTextEditor4_MouseHover(object sender, EventArgs e)
  1099. {
  1100. }
  1101. private void ultraTextEditor4_MouseMove(object sender, MouseEventArgs e)
  1102. {
  1103. }
  1104. private void ultraTextEditor4_MouseEnter(object sender, EventArgs e)
  1105. {
  1106. UltraToolTipInfo utti = new UltraToolTipInfo(ultraTextEditor4.Text, ToolTipImage.Info, "所选属性:", DefaultableBoolean.True);
  1107. ultraToolTipManager1.SetUltraToolTip(ultraTextEditor4, utti);
  1108. ultraToolTipManager1.AutoPopDelay = 10000;
  1109. }
  1110. }
  1111. }