lu
2025-04-01 f121cd2803748763d7abb9509e049bd6e62e8844
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
using DevExpress.XtraEditors;
using Gs.DevApp.Entity;
using Gs.DevApp.ToolBox;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
 
namespace Gs.DevApp.DevFrm.Work
{
    public partial class Frm_WorkStart : DevExpress.XtraEditors.XtraForm
    {
        public Frm_WorkStart()
        {
            InitializeComponent();
 
            _getListJyxm();
            btnLogin.Click += BtnLogin_Click;
        }
 
        private void BtnLogin_Click(object sender, EventArgs e)
        {
            if (txt_bc.SelectedIndex <= 0)
            {
                txt_bc.Focus();
                Gs.DevApp.ToolBox.MsgHelper.ShowInformation("请选择班次!");
                return;
            }
            if (txt_gx.SelectedIndex <= 0)
            {
                txt_gx.Focus();
                Gs.DevApp.ToolBox.MsgHelper.ShowInformation("请选择工序!");
                return;
            }
            string fGx = txt_gx.Text.Trim();
            string fBc = txt_bc.Text.Trim();
            Frm_Work01 frm = new Frm_Work01(fGx, fBc);
            frm.ShowDialog();
        }
 
 
        /// <summary>
        /// 读取工序下拉
        /// </summary>
        private void _getListJyxm()
        {
            var pgq = new PageQueryModel(1, 999999, "a.processNo", "asc", "", "");
            var json = JsonConvert.SerializeObject(pgq);
            try
            {
                var strReturn = UtilityHelper.HttpPost("", "WorkPro/GetListPage", json);
                var dd = UtilityHelper.ReturnToTablePage(strReturn);
                DataTable dt = dd.rtnData.list;
                txt_gx.Properties.Items.Add("-请选择-");
                foreach (DataRow dr in dt.Rows)
                {
                    txt_gx.Properties.Items.Add(dr["processNo"].ToString() + ":" + dr["processName"].ToString());
                }
                txt_gx.Focus();
                txt_gx.SelectedIndex = 0;
            }
            catch (Exception ex)
            {
                MsgHelper.Warning("提示:" + ex.Message);
            }
        }
    }
}