Beispiel #1
0
        public void Init(MES_PD_SCRW_LIST list, string shebeihaoID, Rigth_Type rtype, string sbh)
        {
            dateTimePicker1.Text = list.ZPRQ;
            LastDate             = dateTimePicker1.Text.Trim();
            IsGD         = false;
            this.Text    = GetFormName(rtype);
            unRequireArr = new List <int>();
            bingLSdatagridView();
            bingBomdatagridView();
            RigthType = rtype;
            SMtextBox.Select();
            SBHID = shebeihaoID;
            MES_SY_TYPEMX bcmodel = new MES_SY_TYPEMX();

            bcmodel.GC       = Convert.ToString(getGC("value"));
            bcmodel.TYPEID   = 5;
            MES_PD_SCRW_LIST = list;

            Tmlist = new List <TMDataGrid>();
            if (list.RWBH == null)
            {
                gzzxtextBox.Text = getUserInfo("gzzxtext");
                gctextBox.Text   = getGC("text");
                sbhtextBox.Text  = sbh;
            }
            else
            {
                IsGD = true;
                this._MES_PD_SCRW_LIST = list;
                configUI(list);
            }
        }
Beispiel #2
0
        public void pushSBH(MES_SY_GZZX_SBH[] list, string gzzxtext, Form form1, Rigth_Type type)
        {
            form1.Close();
            form1.Hide();

            if (type == Rigth_Type.gangketl_cc || type == Rigth_Type.zhuxiantl || type == Rigth_Type.fujitl || type == Rigth_Type.zhuxiancc || type == Rigth_Type.baobiaocc || type == Rigth_Type.baozhuangcc || type == Rigth_Type.jidiantitl_cc || type == Rigth_Type.mfqqingxi || type == Rigth_Type.gmgtl_cc || type == Rigth_Type.fujifengkoujitl_cc || type == Rigth_Type.dczztl_cc || type == Rigth_Type.ddjtl_cc || type == Rigth_Type.zhengjifengkoujitl_cc)
            {
                frmFindSBH form = new frmFindSBH(list, gzzxtext, type, true);
                push(form, this);
            }
            else if (type == Rigth_Type.zhengjicc)
            {
                frmZJ_CC zjccform = new frmZJ_CC(list, type);
                push(zjccform, this);
            }
            else if (type == Rigth_Type.fujicc)
            {
                frmFujiCC_N zjccform = new frmFujiCC_N(list, type);
                push(zjccform, this);
            }
            else if (type == Rigth_Type.zhujizhengjitl)
            {
                frmFindSBH form = new frmFindSBH(list, gzzxtext, type, true);
                push(form, this);
            }
        }
Beispiel #3
0
        public void Init(MES_PD_SCRW_LIST list, string shebeihaoID, Rigth_Type rtype, string sbh)
        {
            unRequireArr     = new List <int>();
            MES_PD_SCRW_LIST = list;
            this.Text        = GetFormName(rtype);
            IsTMP            = false;
            bingLSdatagridView();
            bingBomdatagridView();
            RigthType = rtype;
            SMtextBox.Select();
            SBHID = shebeihaoID;
            MES_SY_TYPEMX bcmodel = new MES_SY_TYPEMX();

            bcmodel.GC     = Convert.ToString(getGC("value"));
            bcmodel.TYPEID = 5;
            //MES_SY_TYPEMXLIST[] bclist = ServicModel.SY_TYPEMX.SELECT(bcmodel, getToken());
            //bccomboBox.DisplayMember = "MXNAME";
            //bccomboBox.ValueMember = "ID";
            //bccomboBox.DataSource = bclist;
            //scrqtextBox.Text = DateTime.Now.ToString("yyyy-MM-dd");
            Tmlist = new List <TMDataGrid>();
            if (list.RWBH == null)
            {
                gzzxtextBox.Text = getUserInfo("gzzxtext");
                gctextBox.Text   = getGC("text");
                sbhtextBox.Text  = sbh;
            }
            else
            {
                //this._MES_PD_SCRW_LIST = list;
                //configUI(list);
            }
        }
Beispiel #4
0
        public frmFindGZZX(string BT, Rigth_Type type)
        {
            InitializeComponent();
            grouplabel.Text = BT;
            RigthType       = type;
            if (RigthType == Rigth_Type.zhujizhengjitl)
            {
                gzzxcomboBox.Visible = false;
                label2.Visible       = false;
            }
            Gzzxlb = 0;
            Wllb   = GetWLLBName(RigthType);
            MES_SY_GC gcmodel = new MES_SY_GC();

            gcmodel.STAFFID = Convert.ToInt32(getUserInfo("staffid"));
            MES_SY_GC[] gcList = ServicModel.SY_GC.SELECT_BY_ROLE(gcmodel, getToken());
            for (int i = 0; i < gcList.Length; i++)
            {
                gcList[i].GCMS = gcList[i].GC + "-" + gcList[i].GCMS;
            }
            gccomboBox.DisplayMember = "GCMS";
            gccomboBox.ValueMember   = "GC";
            gccomboBox.DataSource    = gcList;
            button1.Select();
        }
Beispiel #5
0
        public void showGZZX(string tt, Rigth_Type type)
        {
            frmFindGZZX form = new frmFindGZZX(tt, type);

            form.getSBHinfo = pushSBH;
            show(form);
            form.Close();
        }
Beispiel #6
0
 public frmFujiCC_N(MES_SY_GZZX_SBH[] model, Rigth_Type rtype)
 {
     InitializeComponent();
     //Point a = zybutton.Location;
     RigthType = rtype;
     configUI_N(model);
     this.timer1.Start();
 }
Beispiel #7
0
        public frmBaozhuang(MES_PD_SCRW_LIST list, string shebeihaoID, Rigth_Type rtype, string sbh, string tpm)
        {
            InitializeComponent();
            Tpm = tpm;
            Init(list, shebeihaoID, rtype, sbh);

            getTPMinfo(tpm);
        }
Beispiel #8
0
 public frmPrintTM(string tm, Rigth_Type rtype, Print_Type ptype)
 {
     InitializeComponent();
     tmtextBox.Text = tm;
     Tm             = tm;
     RigthType      = rtype;
     PrintType      = ptype;
 }
Beispiel #9
0
        public frmBZ(MES_PD_SCRW_LIST list, string shebeihaoID, Rigth_Type rtype)
        {
            InitializeComponent();
            RigthType = rtype;
            SMtextBox.Select();
            SBHID  = shebeihaoID;
            Tmlist = new List <TMDataGrid>();
            this._MES_PD_SCRW_LIST = list;
            MES_TM_CZR rymodel = new MES_TM_CZR();

            rymodel.GC   = list.GC;
            rymodel.RWBH = list.RWBH;
            rymodel.CZLB = 1;
            _czrList     = ServicModel.TM_CZR.SELECT_CZR_NOW(rymodel, getToken());

            //_bomList = ServicModel.PD_GD.SAP_GET_GDJGXX(list.RWBH,, list.GC, getToken());
            unRequireArr = new List <int>();
            MES_SY_TYPEMX bcmodel = new MES_SY_TYPEMX();

            bcmodel.GC     = Convert.ToString(getGC("value"));
            bcmodel.TYPEID = 5;
            List <MES_SY_TYPEMXLIST> bcArr = new List <MES_SY_TYPEMXLIST>();

            //MES_SY_TYPEMXLIST bcBlank = new MES_SY_TYPEMXLIST();
            //bcBlank.MXNAME = "空";
            //bcBlank.ID = 0;
            //bcArr.Add(bcBlank);

            MES_SY_TYPEMXLIST[] bclist = ServicModel.SY_TYPEMX.SELECT(bcmodel, getToken());
            //for (int i = 0; i < bclist.Length; i++)
            //{
            //    bcArr.Add(bclist[i]);
            //}
            gzzxtextBox.Text = list.GZZXBH + "-" + list.GZZXNAME;
            czrytextBox.Text = _czrList.CZR;
            gctextBox.Text   = list.GC;
            sbhtextBox.Text  = list.SBH;

            MESlabel.Text   = "MES工单:" + list.GDDH;
            GDHlabel.Text   = "工单号:" + list.ERPNO;
            WLXXlabel.Text  = "物料信息:" + list.WLH + "/" + list.WLMS;
            WLLBlabel1.Text = "物料类别:" + list.WLLBNAME;
            rwdlabel.Text   = "任务单:" + list.RWBH;

            //string[] cols = { "序号", "条码", "物料信息", "物料类别","删除",  "物料类别代码", "条码代码","工厂"};
            //string[] colss = { "Xh", "Tm", "Wlxx", "Wllb","del",  "Wllbdm", "tmid" ,"gc"};
            //string[] vcols = { "物料类别代码", "条码代码" ,"工厂"};
            //DataGridBuild(cols, colss, LSdataGridView, vcols);
            BOMdataGridView.DataSource = getBomList(_bomList);

            //System.Timers.Timer t = new System.Timers.Timer(100);
            //t.Elapsed += new System.Timers.ElapsedEventHandler(theout);
            //t.AutoReset = false;//设置是执行一次(false)还是一直执行(true);
            //t.Enabled = true;//是否执行System.Timers.Timer.Elapsed事件;

            LSdataGridView.ReadOnly = true;
            bingLSdatagridView();
        }
Beispiel #10
0
        public frmWLKC_N(Rigth_Type rtype)
        {
            InitializeComponent();
            List       = new List <ZSL_BCS303_BS>();
            ChoiceList = new List <ZSL_BCS303_BS>();
            //monthCalendar1.Visible = false;
            //monthCalendar2.Visible = false;
            RigthType = rtype;
            MES_SY_GC gcmodel = new MES_SY_GC();

            JLdataGridView.AutoGenerateColumns = false;
            gcmodel.STAFFID = Convert.ToInt32(getUserInfo("staffid"));
            List <MES_SY_GC> gcList = ServicModel.SY_GC.SELECT_BY_ROLE(gcmodel, getToken()).ToList();

            for (int i = 0; i < gcList.Count; i++)
            {
                gcList[i].GCMS = gcList[i].GC + "-" + gcList[i].GCMS;
            }
            MES_SY_GC gcchoose = new MES_SY_GC();

            gcchoose.GC   = "0";
            gcchoose.GCMS = q(Msg_Type.titlechoice);//"==请选择==";
            gcList.Insert(0, gcchoose);

            gccomboBox.DisplayMember = "GCMS";
            gccomboBox.ValueMember   = "GC";
            gccomboBox.DataSource    = gcList.ToList();

            List <MES_MM_CK> ckList   = new List <MES_MM_CK>();
            MES_MM_CK        ckchoise = new MES_MM_CK();

            ckchoise.CKDM = "0";
            ckchoise.CKMS = q(Msg_Type.titlechoice);//"==请选择==";
            ckList.Add(ckchoise);
            kcdfcomboBox.DataSource    = ckList;
            kcdfcomboBox.DisplayMember = "CKMS";
            kcdfcomboBox.ValueMember   = "CKDM";
            //MES_MM_CK ckmodel = new MES_MM_CK();
            //ckmodel.STAFFID = Convert.ToInt32(getUserInfo("staffid"));
            //ckmodel.GC = Convert.ToString(gccomboBox.SelectedValue);
            //MES_MM_CK_SELECT ckres = ServicModel.MM_CK.SELECT_BY_STAFFID(ckmodel,getToken());
            //if (ckres.MES_RETURN.TYPE.Equals("S"))
            //{
            //    for (int i = 0; i < ckres.MES_MM_CK.Length; i++)
            //    {
            //        ckres.MES_MM_CK[i].CKMS = ckres.MES_MM_CK[i].CKDM + "-" + ckres.MES_MM_CK[i].CKMS;
            //    }
            //    kcdfcomboBox.DataSource = ckres.MES_MM_CK;
            //    kcdfcomboBox.DisplayMember = "CKMS";
            //    kcdfcomboBox.ValueMember = "CKDM";
            //}
            slrqfromdateTimePicker.Text = DateTime.Now.ToString("yyyy-MM-dd 00:00:00");
            slrqtodateTimePicker.Text   = DateTime.Now.ToString("yyyy-MM-dd 23:59:59");
        }
Beispiel #11
0
        public frmZX_CC(MES_PD_SCRW_LIST list, string shebeihaoID, Rigth_Type rtype)
        {
            InitializeComponent();
            if (list.GC.Equals("8020"))
            {
                showTime = true;
            }
            configTable();
            RigthType        = rtype;
            MES_PD_SCRW_LIST = list;

            //monthCalendar1.Visible = false;
            configUI(MES_PD_SCRW_LIST);
        }
Beispiel #12
0
        public frmChange_GD(MES_PD_SCRW_LIST[] list, string shebeihao, Rigth_Type rtype)
        {
            SBHID     = shebeihao;
            RwList    = list;
            RigthType = rtype;
            int SC_width = 740;

            InitializeComponent();
            #region UI
            //TTlabel.Text = "工单切换信息确认";
            //TTlabel.Location = new Point(10, 24);
            //TTlabel.Size = new Size(SC_width - 20, 40);
            //TTlabel.Font = new Font(q(Msg_Type.fonttype), 18);

            //factory.configLabel(TTlabel, new Size(SC_width - 20, 40), new Point(10, 24), new Font(q(Msg_Type.fonttype), 18), "任务切换");

            TTlabel.Text = q(Msg_Type.fieldrwreplace);//"任务切换";
            //TTlabel.Location = new Point(10, 24);
            //TTlabel.Size = new Size(SC_width - 20, 40);
            TTlabel.Font      = new Font(q(Msg_Type.fonttype), 18);
            TTlabel.TextAlign = ContentAlignment.MiddleCenter;

            //GDdataGridView.Location = new Point(35, TTlabel.Bounds.Y + 40);
            //GDdataGridView.Size = new Size(SC_width - 35, 320);

            //QRbutton.Location = new Point(10, GDdataGridView.Bounds.Y + 320 + 40);
            //QRbutton.Size = new Size(100, 60);
            //QRbutton.Text = "确认";
            //QRbutton.Font = new System.Drawing.Font(q(Msg_Type.fonttype), 16);

            factory.configButton(QRbutton, new Size(100, 60), new Point(10, GDdataGridView.Bounds.Y + 320 + 40), q(Msg_Type.fieldconfirm), null);//

            //QXbutton.Location = new Point(SC_width - 160, GDdataGridView.Bounds.Y + 320 + 40);
            //QXbutton.Size = new Size(100, 60);
            //QXbutton.Text = "取消";
            //QXbutton.Font = new System.Drawing.Font(q(Msg_Type.fonttype), 16);

            factory.configButton(QXbutton, new Size(100, 60), new Point(SC_width - 160, GDdataGridView.Bounds.Y + 320 + 40), q(Msg_Type.fieldcancel), null);//"取消"
            GDdataGridView.BorderStyle = BorderStyle.None;
            #endregion

            bulidDataGrid();
            bingDataGrid();
            //GDdataGridView.DataSource = list;
            GDdataGridView.ReadOnly = true;
            QRbutton.Visible        = false;
            QXbutton.Visible        = false;
        }
Beispiel #13
0
 public frmTL2_1(MES_PD_SCRW_LIST list, string shebeihaoID, Rigth_Type rtype)
 {
     InitializeComponent();
     this.Text = GetFormName(rtype);
     //if (rtype != Rigth_Type.gangketl_cc)
     //{
     //    dyrkbutton.Visible = false;
     //}
     bingLSdatagridView();
     bindBomView();
     RigthType = rtype;
     SMtextBox.Select();
     SBHID  = shebeihaoID;
     Tmlist = new List <TMDataGrid>();
     this._MES_PD_SCRW_LIST = list;
 }
Beispiel #14
0
        public frmLotLog(Rigth_Type rtype, string sbbh, string rwbh, int wllb)
        {
            InitializeComponent();
            RigthType = rtype;
            SBHID     = sbbh;
            Wllb      = wllb;
            Rwbh      = rwbh;

            if (string.IsNullOrEmpty(Rwbh))
            {
                allradioButton2.Checked  = true;
                rwdradioButton1.Visible  = false;
                allradioButton2.Location = rwdradioButton1.Location;
            }
            else
            {
                rwdradioButton1.Checked = true;
            }
            JLdataGridView.AutoGenerateColumns = false;
        }
Beispiel #15
0
        public frmWLKC(Rigth_Type rtype)
        {
            InitializeComponent();
            List       = new List <ZSL_BCS303_BS>();
            ChoiceList = new List <ZSL_BCS303_BS>();
            //monthCalendar1.Visible = false;
            //monthCalendar2.Visible = false;
            RigthType = rtype;
            MES_SY_GC gcmodel = new MES_SY_GC();

            JLdataGridView.AutoGenerateColumns = false;
            gcmodel.STAFFID = Convert.ToInt32(getUserInfo("staffid"));
            MES_SY_GC[] gcList = ServicModel.SY_GC.SELECT_BY_ROLE(gcmodel, getToken());
            for (int i = 0; i < gcList.Length; i++)
            {
                gcList[i].GCMS = gcList[i].GC + "-" + gcList[i].GCMS;
            }
            gccomboBox.DisplayMember = "GCMS";
            gccomboBox.ValueMember   = "GC";
            gccomboBox.DataSource    = gcList;
            MES_MM_CK ckmodel = new MES_MM_CK();

            ckmodel.STAFFID = Convert.ToInt32(getUserInfo("staffid"));
            ckmodel.GC      = getGC("value");
            MES_MM_CK_SELECT ckres = ServicModel.MM_CK.SELECT_BY_STAFFID(ckmodel, getToken());

            if (ckres.MES_RETURN.TYPE.Equals("S"))
            {
                for (int i = 0; i < ckres.MES_MM_CK.Length; i++)
                {
                    ckres.MES_MM_CK[i].CKMS = ckres.MES_MM_CK[i].CKDM + "-" + ckres.MES_MM_CK[i].CKMS;
                }
                kcdfcomboBox.DataSource    = ckres.MES_MM_CK;
                kcdfcomboBox.DisplayMember = "CKMS";
                kcdfcomboBox.ValueMember   = "CKDM";
            }
            //monthCalendar1.Visible = false;
            //monthCalendar2.Visible = false;
            slrqfromdateTimePicker.Text = DateTime.Now.ToString("yyyy-MM-dd 00:00:00");
            slrqtodateTimePicker.Text   = DateTime.Now.ToString("yyyy-MM-dd 23:59:59");
        }
Beispiel #16
0
        public frmZX_TL(MES_PD_SCRW_LIST list, string shebeihaoID, Rigth_Type rtype)
        {
            InitializeComponent();
            RigthType = rtype;
            //if (RigthType == Rigth_Type.zhuxiantl)
            //{
            //    sbhbutton.Visible = false;
            //    qhgdbutton.Location = sbhbutton.Location;

            //}
            //monthCalendar1.Visible = false;
            //scrqtextBox.Text = DateTime.Now.ToString("yyyy-MM-dd");
            SMtextBox.Select();
            SBHID  = shebeihaoID;
            Tmlist = new List <TMDataGrid>();
            this._MES_PD_SCRW_LIST = list;
            if (MES_PD_SCRW_LIST.GC.Equals("8020"))
            {
                showTime = true;
            }
        }
Beispiel #17
0
        public frmFind_GD(string BT, Rigth_Type rtype)
        {
            InitializeComponent();
            #region UI
            RigthType = rtype;
            this.GCtextBox.Location    = new System.Drawing.Point(System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width / 2, 245);
            this.GCtextBox.Text        = getGC("text");
            this.GZZXcomboBox.Location = new System.Drawing.Point(System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width / 2, 300);
            this.SBcomboBox.Location   = new System.Drawing.Point(System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width / 2, 355);
            this.label1.Location       = new System.Drawing.Point(System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width / 2 - 150, 250);
            this.label2.Location       = new System.Drawing.Point(System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width / 2 - 150, 305);
            this.label3.Location       = new System.Drawing.Point(System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width / 2 - 150, 360);
            this.button1.Location      = new System.Drawing.Point(System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width / 2 - 75, 430);

            //
            //BTlabel.Text = BT;
            factory.configLabel(BTlabel, new Size(rect.Width - 20, 40), new Point(10, 94), new Font(q(Msg_Type.fonttype), 25), BT);
            BTlabel.TextAlign = ContentAlignment.MiddleCenter;
            MES_SY_GZZX gzzxmodel = new MES_SY_GZZX();
            gzzxmodel.GC = Convert.ToString(getGC("value"));
            string staff = getUserInfo("staffid");
            if (string.IsNullOrEmpty(staff) == false)
            {
                gzzxmodel.STAFFID = Convert.ToInt32(staff);
            }
            else
            {
                MessageBox.Show("得不到对应的人员信息!!!", "消息框");
            }
            MES_SY_GZZX[] list = ServicModel.SY_GZZX.SELECT_BY_ROLE(gzzxmodel, getToken());
            for (int i = 0; i < list.Length; i++)
            {
                list[i].GZZXBH = list[i].GZZXBH + "-" + list[i].GZZXMS;
            }
            GZZXcomboBox.DataSource    = list;
            GZZXcomboBox.ValueMember   = "ID";
            GZZXcomboBox.DisplayMember = "GZZXBH";
            #endregion
        }
Beispiel #18
0
 public frmZJ_CC(MES_SY_GZZX_SBH[] model, Rigth_Type rtype)
 {
     InitializeComponent();
     Currpldh  = new ZSL_BCT304_LOT();
     Shblist   = model;
     RigthType = rtype;
     //int margin = 15;
     //int h = 21;
     for (int i = 0; i < Shblist.Length; i++)
     {
         Button btn = new Button();
         this.factory.configButton(btn, new Size(60, 60), new Point(20 + rect.Width / 12 * (i % 12), 165 + i / 12 * 75), Shblist[i].SBMS, Shblist[i].SBBH);
         //btn.Tag = (i + 1) * 10;
         //btn.UseVisualStyleBackColor = true;
         btn.Click += new System.EventHandler(this.btn_Click);
         this.Controls.Add(btn);
         if (i == Shblist.Length - 1)
         {
             btn_Click(btn, new EventArgs());
         }
     }
     dybutton.Select();
 }
Beispiel #19
0
 public frmBaobiao(MES_PD_SCRW_LIST list, string shebeihaoID, Rigth_Type rtype, string sbh, string gd)
 {
     InitializeComponent();
     Init(list, shebeihaoID, rtype, sbh);
     getGDinfo(gd);
 }
Beispiel #20
0
        public frmBBprint(MES_TM_TMINFO_INSERT_GL model, Print_Type ptype, Rigth_Type rtype, MES_PD_SCRW_LIST list)
        {
            InitializeComponent();
            RigthType = rtype;
            PrintType = ptype;
            MES_PD_SCRW scrwmodel = new MES_PD_SCRW();

            scrwmodel.RWBH = list.RWBH;
            SELECT_MES_PD_SCRW res = ServicModel.PD_SCRW.SELECT(scrwmodel, getToken());

            if (res.MES_PD_SCRW_LIST.Length == 0)
            {
                ShowMeg(q(Msg_Type.msgrwdempty));
                return;
            }
            list = res.MES_PD_SCRW_LIST[0];
            if (list == null)
            {
                ShowMeg(q(Msg_Type.msgrwdempty));
                return;
            }

            MES_TM_TMINFO_INSERT_GL = model;
            wlxxtextBox.Text        = list.WLH + "/" + list.WLMS;

            if (!string.IsNullOrEmpty(list.XSNOBILL))
            {
                if (!string.IsNullOrEmpty(list.PC))
                {
                    wlsxtextBox.Text = list.XSNOBILL + "-" + list.XSNOBILLMX + "/" + list.PC;
                }
                else
                {
                    wlsxtextBox.Text = list.XSNOBILL + "-" + list.XSNOBILLMX;
                }
            }
            else
            {
                if (!string.IsNullOrEmpty(list.PC))
                {
                    wlsxtextBox.Text = list.PC;
                }
            }
            dcxhtextBox.Text = list.DCXHNAME;
            dcdjtextBox.Text = list.DCDJNAME;
            mbsltextBox.Text = Convert.ToString(list.MPSL);
            bbpmtextBox.Text = list.RQM;

            //if (judge.IsNumber(list.XSNOBILL) == false && !string.IsNullOrEmpty(list.XSNOBILL))
            //{
            //    bzrichTextBox.Text = list.XSNOBILL + "-" + list.XSNOBILLMX;
            //}



            cpztcomboBox.DataSource    = GetDictionaryMX(9);
            cpztcomboBox.DisplayMember = "MXNAME";
            cpztcomboBox.ValueMember   = "ID";
            zhtextBox.Text             = Convert.ToString(ServicModel.PD_SCRW.SELECT_TH_BY_GDDH_SBBH(list.RWBH, getToken()).TH);
            List <MES_SY_TYPEMXLIST> sbcdlist   = GetDictionaryMX(15).ToList();
            MES_SY_TYPEMXLIST        choicllist = new MES_SY_TYPEMXLIST();

            choicllist.ID     = 0;
            choicllist.MXNAME = q(Msg_Type.titlechoice);
            sbcdlist.Insert(0, choicllist);
            sbcdcomboBox.DataSource    = sbcdlist;
            sbcdcomboBox.DisplayMember = "MXNAME";
            sbcdcomboBox.ValueMember   = "ID";
            List <MES_SY_TYPEMXLIST> hdgxlist = GetDictionaryMX(19).ToList();

            hdgxlist.Insert(0, choicllist);
            hdgxcomboBox.DisplayMember = "MXNAME";
            hdgxcomboBox.ValueMember   = "ID";
            hdgxcomboBox.DataSource    = hdgxlist;
            hdgxcomboBox.SelectedValue = list.XDGX;
        }
Beispiel #21
0
        public frmPrint(MES_TM_TMINFO_INSERT_GL model, Print_Type type, Rigth_Type rtype)
        {
            InitializeComponent();
            RigthType = rtype;
            MES_TM_TMINFO_INSERT_GL = model;
            //List<String> list = LocalPrinter.GetLocalPrinters(); //获得系统中的打印机列表
            //IList<comboxclass> cbnodes = new List<comboxclass>();
            rkbslabel.Visible = false;
            TMtextBox.Visible = false;
            //foreach (String s in list)
            //{
            //    //DYcomboBox.Items.Add(s); //将打印机名称添加到下拉框中
            //    comboxclass cb = new comboxclass();
            //    cb.Text = s;
            //    cb.Value = s;
            //    cbnodes.Add(cb);
            //}
            //DYcomboBox.DataSource = cbnodes.ToList();
            //DYcomboBox.ValueMember = "value";
            //DYcomboBox.DisplayMember = "text";
            CPZTcomboBox.Visible = false;
            label5.Text          = "数量:";
            label4.Text          = "箱数:";
            tstextBox.Visible    = true;

            if (type == Print_Type.lot)
            {
                tstextBox.Visible = false;
                TMtextBox.Select();
                if (rtype == Rigth_Type.gangketl_cc)
                {
                    rkbslabel.Visible = true;
                    TMtextBox.Visible = true;
                    //tstextBox.Visible = false;
                }
                else
                {
                    int h = 70;
                    label5.Location          = new Point(label5.Location.X, label5.Location.Y - h);
                    tstextBox.Location       = new Point(tstextBox.Location.X, tstextBox.Location.Y - h);
                    label4.Location          = new Point(label4.Location.X, label4.Location.Y - h);
                    xstextBox.Location       = new Point(xstextBox.Location.X, xstextBox.Location.Y - h);
                    label2.Location          = new Point(label2.Location.X, label2.Location.Y - h);
                    fsnumericUpDown.Location = new Point(fsnumericUpDown.Location.X, fsnumericUpDown.Location.Y - h);
                    label6.Location          = new Point(label6.Location.X, label6.Location.Y - h);
                    bztextBox.Location       = new Point(bztextBox.Location.X, bztextBox.Location.Y - h);
                    //dybutton.Location = new Point(dybutton.Location.X, dybutton.Location.Y - h);
                }
                CPZTcomboBox.Location = tstextBox.Location;

                label5.Text = "状态:";
                label4.Text = "数量:";
                MES_SY_TYPEMX TYPEMX = new MES_SY_TYPEMX();
                TYPEMX.TYPEID              = 9;
                TYPEMX.GC                  = Convert.ToString(getGC("value"));
                CPZTcomboBox.DataSource    = ServicModel.SY_TYPEMX.SELECT(TYPEMX, getToken());
                CPZTcomboBox.Visible       = true;
                CPZTcomboBox.DisplayMember = "MXNAME";
                CPZTcomboBox.ValueMember   = "ID";
            }
            else if (type == Print_Type.rk)
            {
                tstextBox.Select();
                label5.Location          = new Point(label5.Location.X, label5.Location.Y - 50);
                tstextBox.Location       = new Point(tstextBox.Location.X, tstextBox.Location.Y - 50);
                label2.Location          = new Point(label2.Location.X, label2.Location.Y - 50);
                label4.Location          = new Point(label4.Location.X, label4.Location.Y - 50);
                xstextBox.Location       = new Point(xstextBox.Location.X, xstextBox.Location.Y - 50);
                fsnumericUpDown.Location = new Point(fsnumericUpDown.Location.X, fsnumericUpDown.Location.Y - 50);
            }
            PrintType = type;
            RigthType = rtype;
            switch (type)
            {
            case Print_Type.rk:
                this.Text = "打印入库标识";
                break;

            case Print_Type.lot:
                this.Text = "打印LOT";
                break;

            default:
                break;
            }

            MES_TM_TMINFO_INSERT_GL = model;

            //int width = printDialog1.PrinterSettings.DefaultPageSettings.PaperSize.Width;
        }
Beispiel #22
0
 public frmBaozhuang(MES_PD_SCRW_LIST list, string shebeihaoID, Rigth_Type rtype, string sbh)
 {
     InitializeComponent();
     Init(list, shebeihaoID, rtype, sbh);
 }
Beispiel #23
0
        /// <summary>
        /// 动态按钮点击事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btn_Click(object sender, EventArgs e)
        {
            Button     btn  = (Button)sender;
            int        tag  = Convert.ToInt32(btn.Tag);
            Rigth_Type type = (Rigth_Type)tag;

            if (type == Rigth_Type.wlrkdy)
            {
                frmWLKC_N form = new frmWLKC_N(type);
                push(form, this);
            }
            else if (type == Rigth_Type.zhujizhengjitl)
            {
                MES_SY_GC gcmodel = new MES_SY_GC();
                gcmodel.STAFFID = Convert.ToInt32(getUserInfo("staffid"));
                MES_SY_GC[] gcList = ServicModel.SY_GC.SELECT_BY_ROLE(gcmodel, getToken());
                if (gcList.Length > 1)
                {
                    showGZZX(btn.Text, type);
                }
                else if (gcList.Length == 1)
                {
                    MES_SY_GZZX_SBH model = new MES_SY_GZZX_SBH();
                    model.GC       = gcList[0].GC;
                    model.STAFFID  = Convert.ToInt16(getUserInfo("staffid"));
                    model.WLLBNAME = "素电";
                    MES_SY_GZZX_SBH[] list = ServicModel.SY_GZZX_SBH.SELECT_BY_STAFFID(model, getToken());
                    frmFindSBH        form = new frmFindSBH(list, q(Msg_Type.choiceCX), type, true);
                    push(form, this);
                }
                else
                {
                    ShowMeg(q(Msg_Type.accountnotgcrole));
                }
            }
            else if (type == Rigth_Type.tmbd)
            {
                frmTM_bd form = new frmTM_bd();
                push(form, this);
            }
            else if (type == Rigth_Type.tmbdLimit)
            {
                frmTM_bdLimit form = new frmTM_bdLimit();
                push(form, this);
            }
            else if (type == Rigth_Type.sgsm)
            {
                frmSGSM form = new frmSGSM();
                push(form, this);
            }
            else if (type == Rigth_Type.tbprint)
            {
                frmPrintTM form = new frmPrintTM();
                show(form);
            }
            else if (type == Rigth_Type.tmInfoUpdate)
            {
                frmTM_INFO_UPDATE form = new frmTM_INFO_UPDATE();
                show(form);
            }
            else if (type == Rigth_Type.configSetting)
            {
                frmConfigView form = new frmConfigView();
                push(form, this);
            }
            else if (type == Rigth_Type.rwdsm)
            {
                frmRWDSCAN form = new frmRWDSCAN();
                form.block = RWDSCAN;
                show(form);
            }
            else if (type == Rigth_Type.sudianfangong)
            {
                int[]        arr  = { 7 };
                frmSGSM_Puls form = new frmSGSM_Puls(arr);
                push(form, this);
            }
            else if (type == Rigth_Type.zhengjicc)
            {
                showGZZX(btn.Text, type);
            }
            else if (type == Rigth_Type.fujicc)
            {
                showGZZX(btn.Text, type);
            }
            else if (type == Rigth_Type.fujitl)
            {
                showGZZX(btn.Text, type);
            }
            else if (type == Rigth_Type.zswllotdy)
            {
                frmZSLotprint form = new frmZSLotprint();
                //show(form);
                int ScreenWidth  = Screen.PrimaryScreen.WorkingArea.Width;
                int ScreenHeight = Screen.PrimaryScreen.WorkingArea.Height;
                //计算窗体显示的坐标值,可以根据需要微调几个像素

                form.StartPosition = FormStartPosition.CenterScreen;

                //this.Visible = false;

                form.Show();
            }
            else
            {
                MES_SY_GC gcmodel = new MES_SY_GC();
                gcmodel.STAFFID = Convert.ToInt32(getUserInfo("staffid"));
                MES_SY_GC[] gcList = ServicModel.SY_GC.SELECT_BY_ROLE(gcmodel, getToken());
                if (gcList.Length == 1)
                {
                    MES_SY_GZZX gzzxmodel = new MES_SY_GZZX();
                    gzzxmodel.GC      = gcList[0].GC;
                    gzzxmodel.STAFFID = Convert.ToInt32(getUserInfo("staffid"));
                    //gzzxmodel.WLLB = Gzzxlb;
                    gzzxmodel.WLLBNAME = GetwllbRightTypeString(type);
                    MES_SY_GZZX[] list = ServicModel.SY_GZZX.SELECT_BY_ROLE(gzzxmodel, getToken());
                    if (list.Length == 1)
                    {
                        MES_SY_GZZX_SBH model = new MES_SY_GZZX_SBH();

                        model.GZZXBH = list[0].GZZXBH;

                        model.GC = gzzxmodel.GC;
                        //model.WLLB = Gzzxlb;
                        model.WLLBNAME = GetwllbRightTypeString(type);
                        MES_SY_GZZX_SBH[] sbhlist = ServicModel.SY_GZZX_SBH.SELECT(model, getToken());
                        frmFindSBH        form    = new frmFindSBH(sbhlist, list[0].GZZXMS, type, true);
                        push(form, this);
                    }
                    else
                    {
                        showGZZX(btn.Text, type);
                    }
                }
                else
                {
                    showGZZX(btn.Text, type);
                }
            }
        }
Beispiel #24
0
        public frmTL2(MES_PD_SCRW_LIST list, string shebeihaoID, Rigth_Type rtype)
        {
            InitializeComponent();
            this.Text = GetFormName(rtype);
            if (rtype != Rigth_Type.gangketl_cc)
            {
                dyrkbutton.Visible = false;
            }
            bingLSdatagridView();
            bindBomView();
            RigthType = rtype;
            SMtextBox.Select();
            SBHID  = shebeihaoID;
            Tmlist = new List <TMDataGrid>();
            this._MES_PD_SCRW_LIST = list;
            MES_TM_CZR rymodel = new MES_TM_CZR();

            rymodel.GC   = list.GC;
            rymodel.RWBH = list.RWBH;
            rymodel.CZLB = 1;
            _czrList     = ServicModel.TM_CZR.SELECT_CZR_NOW(rymodel, getToken());
            _bomList     = ServicModel.PD_GD.SAP_GET_GDJGXX(list.RWBH, dateTimePicker1.Text.Trim(), list.GC, getToken());
            unRequireArr = new List <int>();
            MES_SY_TYPEMX bcmodel = new MES_SY_TYPEMX();

            bcmodel.GC     = Convert.ToString(getGC("value"));
            bcmodel.TYPEID = 5;
            List <MES_SY_TYPEMXLIST> bcArr = new List <MES_SY_TYPEMXLIST>();

            MES_SY_TYPEMXLIST[] bclist = ServicModel.SY_TYPEMX.SELECT(bcmodel, getToken());
            gzzxtextBox.Text = list.GZZXBH + "-" + list.GZZXNAME;
            czrytextBox.Text = _czrList.CZR;
            gctextBox.Text   = list.GC;
            sbhtextBox.Text  = list.SBH;
            pctextBox.Text   = list.PC;

            MES_SY_TYPEMXLIST bcmodel1 = new MES_SY_TYPEMXLIST();

            bcmodel1.ID     = 0;
            bcmodel1.MXNAME = "==请选择==";
            bcArr           = bclist.ToList();
            bcArr.Insert(0, bcmodel1);

            bccomboBox.DisplayMember   = "MXNAME";
            bccomboBox.ValueMember     = "ID";
            bccomboBox.DataSource      = bcArr;
            bccomboBox.SelectedValue   = list.BC;
            MESlabel.Text              = "MES工单:" + list.GDDH;
            GDHlabel.Text              = "工单号:" + list.ERPNO;
            WLXXlabel.Text             = "物料信息:" + list.WLH + "/" + list.WLMS;
            WLLBlabel1.Text            = "物料类别:" + list.WLLBNAME;
            rwdlabel.Text              = "任务单:" + list.RWBH;
            BOMdataGridView.DataSource = getBomList(_bomList);
            //scrqtextBox.Text = DateTime.Now.ToString("yyyy-MM-dd");
            LSdataGridView.ReadOnly = true;
            if (RigthType == Rigth_Type.mfqqingxi)
            {
                GDHlabel.Visible   = false;
                WLXXlabel.Location = GDHlabel.Location;
            }
        }
Beispiel #25
0
        public frmPrint_N(MES_TM_TMINFO_INSERT_GL model, Print_Type type, Rigth_Type rtype)
        {
            InitializeComponent();
            RigthType = rtype;
            MES_TM_TMINFO_INSERT_GL = model;
            if (!string.IsNullOrEmpty(MES_TM_TMINFO_INSERT_GL.MES_TM_TMINFO.MAXVALUE))
            {
                xstextBox.MaxLength = Convert.ToInt32(MES_TM_TMINFO_INSERT_GL.MES_TM_TMINFO.MAXVALUE);
            }

            CPZTcomboBox.Visible = false;
            label5.Text          = q(Msg_Type.titleslspace); //"数  量:";
            label4.Text          = q(Msg_Type.titlexsspace); //"箱  数:";
            tstextBox.Visible    = true;

            if (type == Print_Type.lot)
            {
                tstextBox.Visible     = false;
                CPZTcomboBox.Location = tstextBox.Location;
                label5.Text           = q(Msg_Type.titleztspace); //"状  态:";
                label4.Text           = q(Msg_Type.titleslspace); //"数  量:";
                xstextBox.Text        = model.MES_TM_TMINFO.SL == 0 ? "" : model.MES_TM_TMINFO.SL.ToString();


                MES_SY_TYPEMX TYPEMX = new MES_SY_TYPEMX();
                TYPEMX.TYPEID              = 9;
                TYPEMX.GC                  = Convert.ToString(getGC("value"));
                CPZTcomboBox.DataSource    = ServicModel.SY_TYPEMX.SELECT(TYPEMX, getToken());
                CPZTcomboBox.Visible       = true;
                CPZTcomboBox.DisplayMember = "MXNAME";
                CPZTcomboBox.ValueMember   = "ID";
            }
            else if (type == Print_Type.rk)
            {
            }
            PrintType = type;
            RigthType = rtype;
            switch (type)
            {
            case Print_Type.rk:
                this.Text = q(Msg_Type.fielddyrkbs);    //"打印入库标识";
                break;

            case Print_Type.lot:
                this.Text = q(Msg_Type.fielddylotB);    //"打印LOT";
                break;

            default:
                break;
            }
            MES_TM_TMINFO_INSERT_GL = model;
            xstextBox.Select();
            if (RigthType == Rigth_Type.gangketl_cc)
            {
                fsnumericUpDown.Value = 3;
            }
            else if (RigthType == Rigth_Type.ddjtl_cc)
            {
                fsnumericUpDown.Value = 4;
            }
            if (RigthType == Rigth_Type.jidiantitl_cc || RigthType == Rigth_Type.fujifengkoujitl_cc || RigthType == Rigth_Type.zhengjifengkoujitl_cc)
            {
                Sonluk.UI.Model.MES.PD_SCRWService.MES_PD_SCRW_CCTH res = new UI.Model.MES.PD_SCRWService.MES_PD_SCRW_CCTH();
                if (RigthType == Rigth_Type.jidiantitl_cc)
                {
                    res = ServicModel.PD_SCRW.SELECT_ZXCCINFO(MES_TM_TMINFO_INSERT_GL.MES_TM_TMINFO.RWBH, MES_TM_TMINFO_INSERT_GL.MES_TM_TMINFO.BC, getToken());
                }
                else
                {
                    res = ServicModel.PD_SCRW.SELECT_ZXCCINFO(MES_TM_TMINFO_INSERT_GL.MES_TM_TMINFO.RWBH, 0, getToken());
                }

                if (res.MES_RETURN.TYPE.Equals("S"))
                {
                    qshtextBox.Text = res.TH.ToString();
                }
                else
                {
                    ShowMeg(q(Msg_Type.msgthdataexcept) + res.MES_RETURN.MESSAGE);//"获取桶号信息报错"
                }
            }
            else
            {
                qshtextBox.Visible = false;
                label7.Visible     = false;
                richTextBox1.Width = 426;
            }
        }
Beispiel #26
0
 public frmFindSBH(MES_SY_GZZX_SBH[] list, string gzzx, Rigth_Type rtype, string tm)
 {
     InitializeComponent();
     Tm = tm;
     Init(list, gzzx, rtype);
 }
Beispiel #27
0
 public frmFindSBH(MES_SY_GZZX_SBH[] list, string gzzx, Rigth_Type rtype, bool isfindFJ)
 {
     InitializeComponent();
     IsFJpipeline = isfindFJ;
     Init(list, gzzx, rtype);
 }
Beispiel #28
0
        public void Init(MES_SY_GZZX_SBH[] list, string gzzx, Rigth_Type rtype)
        {
            RigthType = rtype;
            Sbhlist   = list;
            Gzzx      = gzzx;

            if (rtype == Rigth_Type.zhujizhengjitl)
            {
                label1.Text = q(Msg_Type.fieldsdscx);//"素电生产线";
            }
            else
            {
                MES_SY_GZZX model = new MES_SY_GZZX();
                if (list.Length > 0)
                {
                    model.GC = list[0].GC;

                    model.GZZXBH = gzzx;
                    string[] sArray = model.GZZXBH.Split('-');
                    if (sArray.Length > 1)
                    {
                        label1.Text = gzzx;
                    }
                    else
                    {
                        MES_SY_GZZX[] res = ServicModel.SY_GZZX.SELECT(model, getToken());
                        if (res.Length == 0)
                        {
                            label1.Text = gzzx;
                        }
                        else
                        {
                            label1.Text = gzzx + "-" + res[0].GZZXMS;
                        }
                    }
                }
                else
                {
                    label1.Text = gzzx;
                }
            }
            panel1.AutoScroll = true;
            for (int i = 0; i < list.Length; i++)
            {
                Button btn = new Button();
                if (RigthType == Rigth_Type.fujitl)
                {
                    btn.Size     = new Size(180, 140);
                    btn.Location = new Point(10 + rect.Width / 5 * (i % 5), 0 + i / 5 * 195);
                    btn.Font     = new System.Drawing.Font(q(Msg_Type.fonttype), 40);
                }
                else
                {
                    btn.Size     = new Size(90, 70);
                    btn.Location = new Point(10 + rect.Width / 10 * (i % 10), 0 + i / 10 * 85);
                    btn.Font     = new System.Drawing.Font(q(Msg_Type.fonttype), 13);
                }
                btn.Text      = list[i].SBMS;
                btn.Tag       = list[i].SBBH;
                btn.Click    += new System.EventHandler(this.btn_Click);
                btn.FlatStyle = FlatStyle.Popup;
                panel1.Controls.Add(btn);
            }


            smtextBox1.Select();
        }