| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125 |
- using CoreFS.CA06;
- 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 Core.StlMes.Client.Qcm;
- using Core.Mes.Client.Comm.Server;
- using Core.Mes.Client.Comm.Control;
- using Core.Mes.Client.Comm.Tool;
- namespace Core.StlMes.Client.SaleOrder.ReviewForm
- {
- public partial class FrmQueryTechnologyByUnit : FrmBase
- {
- public FrmQueryTechnologyByUnit()
- {
- InitializeComponent();
- }
- public override void ToolBar_Click(object sender, string ToolbarKey)
- {
- base.ToolBar_Click(sender, ToolbarKey);
- if (ToolbarKey == "Query")
- {
- Query();
- }
- else if (ToolbarKey == "Export")
- {
- GridHelper.ulGridToExcel(this.ultraGridOrderLine, "合同技术评审记录");
- }
- else if (ToolbarKey == "Close")
- {
- this.Close();
- }
- }
- private void Query()
- {
- if (ultraTextEditor1.Tag == null)
- {
- MessageUtil.ShowWarning("请选择查询条件");
- return;
- }
- WaitingForm2 waiting = new WaitingForm2("正在查询,请稍候....");
- try
- {
- this.Cursor = Cursors.WaitCursor;
- string department = ultraTextEditor1.Tag.ToString2();
- string unit = ultraTextEditor2.Tag.ToString2();
- string user = ultraTextEditor3.Text.Trim();
- DataTable dt = ServerHelper.GetData("com.steering.pss.sale.order.ReviewForm.CoreOrderReviewTechnology.QueryTechnologyByUnit",
- new object[] { department, unit, user }, ob);
- GridHelper.CopyDataToDatatable(dt, slm_order_line, true);
- }
- finally
- {
- waiting.Close();
- this.Cursor = Cursors.Default;
- }
- }
- private void ultraTextEditor1_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
- {
- DataTable dt = new DataTable();
- dt.Columns.AddRange(new DataColumn[]{
- new DataColumn(){ColumnName = "DEPARTID", Caption = "管理部门"},
- new DataColumn(){ColumnName = "DEPARTNAME", Caption = "管理部门"}});
- dt.Rows.Add("002001007", "技术中心");
- dt.Rows.Add("002001001", "制造部");
- BaseInfoPopup popup = new BaseInfoPopup(dt, "DEPARTNAME", "DEPARTID", "PID", "REMARK", "ISROOT", "IDX");
- if(popup.ShowDialog() == System.Windows.Forms.DialogResult.OK)
- {
- ultraTextEditor1.Text = popup.ChoicedRow.GetValue("DEPARTNAME");
- ultraTextEditor1.Tag = popup.ChoicedRow.GetValue("DEPARTID");
- ultraTextEditor2.Text = "";
- ultraTextEditor2.Tag = null;
- ultraTextEditor3.Text = "";
- ultraTextEditor3.Tag = null;
- }
- }
- private void ultraTextEditor2_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
- {
- if (ultraTextEditor1.Tag == null)
- {
- MessageUtil.ShowWarning("请先选择部门!");
- return;
- }
- DataTable dt = ServerHelper.GetData("com.steering.comm.data.ComBaseInfo.getSection",
- new object[] { ultraTextEditor1.Tag.ToString2() }, ob);
- dt.Columns["DEPARTNAME"].Caption = "管理科室";
- BaseInfoPopup popup = new BaseInfoPopup(dt, "DEPARTNAME", "DEPARTID", "PID", "REMARK", "ISROOT", "IDX");
- if (popup.ShowDialog() == System.Windows.Forms.DialogResult.OK)
- {
- ultraTextEditor2.Text = popup.ChoicedRow.GetValue("DEPARTNAME");
- ultraTextEditor2.Tag = popup.ChoicedRow.GetValue("DEPARTID");
- ultraTextEditor3.Text = "";
- ultraTextEditor3.Tag = null;
- }
- }
- private void ultraTextEditor3_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
- {
- if (ultraTextEditor2.Tag == null)
- {
- MessageUtil.ShowWarning("请先选择科室!");
- return;
- }
- DataTable dt = ServerHelper.GetData("com.steering.pss.sale.order.ReviewForm.CoreOrderReviewTechnology.getUser",
- new object[] { ultraTextEditor2.Tag.ToString2() }, ob);
- dt.Columns["USERNAME"].Caption = "成员名称";
- BaseInfoPopup popup = new BaseInfoPopup(dt, "USERNAME", "USERID");
- if (popup.ShowDialog() == System.Windows.Forms.DialogResult.OK)
- {
- ultraTextEditor3.Text = popup.ChoicedRow.GetValue("USERNAME");
- }
- }
- }
- }
|