| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- using CoreFS.CA06;
- using Pur.Entity;
- using Infragistics.Win;
- using Infragistics.Win.UltraWinGrid;
- using Core.Mes.Client.Comm.Control;
- using Infragistics.Win.UltraWinTree;
- using Pur.Entity.configureEntity;
- using System.Data.OracleClient;
- using Core.Mes.Client.Comm.Tool;
- using Infragistics.Win.UltraWinEditors;
- using Infragistics.Win.UltraWinScrollBar;
- using com.hnshituo.pur.vo;
- using System.Collections;
- using Core.Mes.Client.Comm.Server;
- using Pur.Pop_upWindow;
- namespace Pur.Pop_upWindow
- {
- public partial class frmPopMatClassPross : FrmPmsBase
- {
- string QstrMatClassCode = "";
- public string QstrTenantId = "";
- string QstrTenantName = "";
- PurmatclassEntity Qmat = null;
- public frmPopMatClassPross(OpeBase ob,string strMatClassCode)
- {
- InitializeComponent();
- this.ob = ob;
- QstrMatClassCode = strMatClassCode;
- }
- private void frmPopMatClassPross_Load(object sender, EventArgs e)
- {
- DataTable dt = ServerHelper.GetData("com.hnshituo.pur.configure.service.impl.CoreBaseInfoNew.doQuery", new Object[] { "122601" }, this.ob);
- removeNotValiflagData(dt);
- ultraComboEditor1.DataSource = dt;
- ultraComboEditor1.DisplayMember = "BASENAME";
- ultraComboEditor1.ValueMember = "BASECODE";
- ultraComboEditor2.DataSource = dt;
- ultraComboEditor2.DisplayMember = "BASENAME";
- ultraComboEditor2.ValueMember = "BASECODE";
- if (ultraComboEditor2.Items.Count > 0)
- {
- ultraComboEditor2.SelectedIndex = 0;
- }
- Qmat = new PurmatclassEntity();
- Qmat.Validflag = "1";
- Qmat = this.execute<PurmatclassEntity>("com.hnshituo.pur.configure.service.MatClassService", "findById", new object[] { QstrMatClassCode});
- ultraComboEditor1.Value = Qmat.TenantId;
- }
- /// <summary>
- /// 移除无效数据
- /// </summary>
- /// <param name="dt"></param>
- private void removeNotValiflagData(DataTable dt)
- {
- for (int i = 0; i < dt.Rows.Count; )
- {
- if (dt.Rows[i]["VALIDFLAG"].ToString() == "0")
- {
- dt.Rows.RemoveAt(i);
- }
- else
- {
- i++;
- }
- }
- }
- private void ultraButton1_Click(object sender, EventArgs e)
- {
- this.Close();
- }
- /// <summary>
- /// 保存
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void btnChkDelegate_Click(object sender, EventArgs e)
- {
- PurmatclassEntity mat = new PurmatclassEntity();
- mat.Basecode = QstrMatClassCode;
- if (ultraComboEditor2.Value != null)
- {
- mat.TenantId = ultraComboEditor2.Value.ToString();
- mat.TenantName = ultraComboEditor2.Text;
- mat.UpdateName = this.UserInfo.GetUserName();
- mat.UpdateUserid = this.UserInfo.GetUserID();
- CoreResult crt = this.execute<CoreResult>("com.hnshituo.pur.configure.service.MatClassService", "doUpdate", new object[] { mat });
- if (crt.Resultcode != 0)
- {
- MessageUtil.ShowTips("保存失败" + crt.Resultmsg);
- return;
- }
- else
- {
- MessageUtil.ShowTips("保存成功");
- Close();
- }
- }
- else
- {
- MessageUtil.ShowTips("请选择本次保存的需求流程");
- return;
- }
-
- }
- }
- }
|