Esempio n. 1
0
        public FInOutView()
        {
            InitializeComponent();
            PickDoneService     = new BenQGuru.eMES.WinCeClient.PickDone.PickDone();
            PickDoneService.Url = WebServiceFacade.GetWebServiceURL() + "PickDone.asmx";
            DQMCode             = ApplicationService.Current().MaterInfo.DQMCode.ToUpper();
            PickNo = ApplicationService.Current().MaterInfo.PickNo.ToUpper();
            this.lblDQMCode.Text = DQMCode;

            DataTable dt1 = new DataTable();

            dt1 = PickDoneService.GetInOutRule(DQMCode, PickNo);
            //rows = dt.Rows.Count;
            //this.dataGrid1.DataSource = dt1;
            if (dt1.Rows.Count > 0)
            {
                DataGridTableStyle ts = new DataGridTableStyle();
                ts.MappingName = dt1.TableName;

                DataGridColumnStyle ColStyle1 = new DataGridTextBoxColumn();
                ColStyle1.MappingName = dt1.Columns[0].ColumnName.ToString();
                ColStyle1.HeaderText  = "首次入库时间";
                //ColStyle1.Width = 20;
                ts.GridColumnStyles.Add(ColStyle1);

                DataGridColumnStyle ColStyle3 = new DataGridTextBoxColumn();
                ColStyle3.MappingName = dt1.Columns[1].ColumnName.ToString();
                ColStyle3.HeaderText  = "货位";
                ts.GridColumnStyles.Add(ColStyle3);

                DataGridColumnStyle ColStyle4 = new DataGridTextBoxColumn();
                ColStyle4.MappingName = dt1.Columns[2].ColumnName.ToString();
                ColStyle4.HeaderText  = "箱号";
                ts.GridColumnStyles.Add(ColStyle4);

                DataGridColumnStyle ColStyle5 = new DataGridTextBoxColumn();
                ColStyle5.MappingName = dt1.Columns[3].ColumnName.ToString();
                ColStyle5.HeaderText  = "数量";
                ts.GridColumnStyles.Add(ColStyle5);

                DataGridColumnStyle ColStyle6 = new DataGridTextBoxColumn();
                ColStyle6.MappingName = dt1.Columns[4].ColumnName.ToString();
                ColStyle6.HeaderText  = "批次号";
                ts.GridColumnStyles.Add(ColStyle6);


                this.dataGrid1.TableStyles.Clear();
                this.dataGrid1.TableStyles.Add(ts);

                this.dataGrid1.DataSource = dt1;
            }
        }
Esempio n. 2
0
        private string  AddStorLoc( )
        {
            string newIqcNo = txtLocationNoEdit.Text.Trim();

            string fromCarton = txtOriginalCartonEdit.Text.Trim();
            string result     = LocStorTransService.Add(ApplicationService.Current().LoginInfo.UserCode.ToUpper(), newIqcNo, fromCarton);

            if (result != null)
            {
                return(result);
            }
            return("");
        }
Esempio n. 3
0
 //绑定拣货任务令号
 private void BindPickNOComBox()
 {
     string[] str = _PackagingOperationsService.QueryPickNONotY(ApplicationService.Current().LoginInfo.UserCode.ToUpper());
     this.cmbPickNO.Items.Clear();
     if (str != null)
     {
         this.cmbPickNO.Items.Add(string.Empty);
         foreach (string s in str)
         {
             this.cmbPickNO.Items.Add(s);
         }
     }
     else
     {
         this.cmbPickNO.Items.Add(string.Empty);
     }
     this.cmbPickNO.SelectedIndex = 0;
 }
Esempio n. 4
0
        private void btnSubmit_Click(object sender, EventArgs e)
        {
            string msg = AddStorLoc();

            if (msg != "新增成功")
            {
                this.lblMessage.Text = msg;
                return;
            }

            #region check
            string transNo = txtLocationNoEdit.Text.Trim();
            //string dqmCode = "";// txtDQMoCodeEdit.Text.Trim();

            string tLocationCode = txtTLocationCodeEdit.Text.Trim();   //目标货位
            string fromCarton    = txtOriginalCartonEdit.Text.Trim();  //原箱号 FromCARTONNO
            string tcarton       = txtTLocationCartonEdit.Text.Trim(); //目标箱号
            string inputsn       = txtSNEdit.Text.Trim();              //SN
            string inputqty      = txtNumEdit.Text.Trim();             //数量
            string statusList    = "";
            if (this.rdoAllCarton.Checked)
            {
                statusList = "AllCarton"; //CartonType.CartonType_AllCarton;
            }
            else
            {
                statusList = "SplitCarton";//= CartonType.CartonType_SplitCarton;
            }
            #endregion

            string userCode = ApplicationService.Current().LoginInfo.UserCode.ToUpper();
            string result   = LocStorTransService.Commit_Click(userCode, statusList, transNo, tLocationCode,
                                                               fromCarton, tcarton, inputsn, inputqty);


            if (result == "提交成功")
            {
                txtNumEdit.Text             = string.Empty;
                txtSNEdit.Text              = string.Empty;
                txtTLocationCartonEdit.Text = string.Empty;
            }
            this.lblMessage.Text = result;
        }
Esempio n. 5
0
 private void InitDropList()
 {
     this.cboPickNo.Items.Clear();
     string[] str = PickDoneService.QueryPickNo(ApplicationService.Current().LoginInfo.UserCode.ToUpper());
     this.cboPickNo.Items.Add("");
     if (str != null)
     {
         foreach (string s in str)
         {
             this.cboPickNo.Items.Add(s);
         }
         //for (int i = 0; i < dt.Rows.Count; i++)
         //{
         //    if (!string.IsNullOrEmpty(dt.Rows[i][0].ToString()))
         //    {
         //        this.cboPickNo.Items.Add(dt.Rows[i][0].ToString());
         //    }
         //}
     }
 }
Esempio n. 6
0
        //上传图片
        private void btnUpPic_Click(object sender, EventArgs e)
        {
            DialogResult r = this.openFileDialog1.ShowDialog();

            if (r != DialogResult.OK)
            {
                return;
            }

            string fileName = this.openFileDialog1.FileName;

            byte[] bs;
            using (System.IO.FileStream fs = new FileStream(fileName, FileMode.Open))
            {
                bs = new byte[fs.Length];
                //MessageBox.Show(bs.Length.ToString());
                int count = fs.Read(bs, 0, (int)fs.Length);
                if (count <= 0)
                {
                    MessageBox.Show("读取的文件长度为0"); return;
                }
            }
            string type = string.Empty;

            if (this.rdbGiveinPic.Checked)
            {
                type = "InitGivein";
            }
            else if (this.rdbRejectPic.Checked)
            {
                type = "InitReject";
            }
            else
            {
                MessageBox.Show("必须选择图片类型!"); return;
            }
            string userCode = ApplicationService.Current().LoginInfo.UserCode.ToUpper();

            asnService.UploadFile(bs, this.STNo, type, userCode);
        }
Esempio n. 7
0
        //数量回车
        private void txtQTY_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == '\r')
            {
                if (!this.ValidateInput())
                {
                    return;
                }
                pickNo       = this.cmbPickNO.Text;
                gfHWItemCode = this.cmbGFHWItemCode.Text;
                gfPackingSEQ = this.cmbGFPackingSEQ.Text;
                suiteQTY     = this.txtSuiteQTY.Text.Trim();
                dqMCode      = this.cmbDQMCode.Text;
                dqsMCode     = this.drpDQSMCodeEdit.Text;
                cartonNo     = this.txtCartonNO.Text.Trim().ToUpper();
                qty          = this.txtQTY.Text.Trim();
                userCode     = ApplicationService.Current().LoginInfo.UserCode.ToUpper();

                this.lblMessage.Text = this._PackagingOperationsService.GFQTYKeyPressReturnMessage(pickNo, gfHWItemCode, gfPackingSEQ, suiteQTY, dqMCode, dqsMCode, cartonNo, qty, userCode);

                string _str = this._PackagingOperationsService.GetString(pickNo);
                this.lblPQTY.Text = _str.Split(',')[0];
            }
        }
Esempio n. 8
0
        private void btnSubmit_Click(object sender, EventArgs e)
        {
            string message = string.Empty;
            bool   result  = s.SubmitPortionCheck(cboCheckNo.SelectedItem.ToString(),
                                                  txtCARTONNO.Text,
                                                  txtQTY.Text,
                                                  txtLocationCode.Text,
                                                  txtDiffDesc.Text,
                                                  txtDQMCode.Text,
                                                  ApplicationService.Current().LoginInfo.UserCode.ToUpper(),
                                                  out message);

            if (result)
            {
                txtCARTONNO.Text     = string.Empty;
                txtQTY.Text          = string.Empty;
                txtLocationCode.Text = string.Empty;
                txtDiffDesc.Text     = string.Empty;
                txtDQMCode.Text      = string.Empty;
                DataTable dt = s.GetPortionStockCheckOps(cboCheckNo.SelectedItem.ToString());
                BindGrid(dt);
            }
            MessageBox.Show(message);
        }
Esempio n. 9
0
        private void btnSubmit_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(this.cboPickNo.Text))
            {
                MessageBox.Show("请先选择拣货任务令号");
                this.cboPickNo.Focus();
                return;
            }
            int re;

            if (!string.IsNullOrEmpty(this.txtNumber.Text))
            {
                try
                {
                    re = int.Parse(this.txtNumber.Text.Trim());
                }
                catch (Exception ex)
                {
                    MessageBox.Show("数量只能输入大于0的数字");
                    return;
                }
                if (re <= 0)
                {
                    MessageBox.Show("数量只能输入大于0的数字");
                    return;
                }
            }

            if (string.IsNullOrEmpty(this.txtCartonNo.Text.ToUpper()) && string.IsNullOrEmpty(this.txtSN.Text.ToUpper()))
            {
                MessageBox.Show("必须输入箱号或SN");
                return;
            }
            string CartonNo = this.txtCartonNo.Text.ToUpper();
            string PickNo   = this.cboPickNo.Text.ToUpper();
            string SN       = this.txtSN.Text.ToUpper();
            string Number   = this.txtNumber.Text.ToUpper();
            bool   ISALL    = true;

            if (this.rdoSplitCarton.Checked)
            {
                ISALL = false;
            }
            else
            {
                ISALL = true;
            }
            string result = PickDoneService.CheckInOutRule(PickNo, CartonNo, Number, SN, ISALL, true);

            if (result != "OK")
            {
                if (result == "箱号违反先进先出规则")
                {
                    if (MessageBox.Show("此箱号违反先进先出规则,是否继续?", "确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == System.Windows.Forms.DialogResult.No)
                    {
                        return;
                    }
                }
                else
                {
                    this.lblMessage.Text = result;
                    return;
                }
            }
            string UserCode = ApplicationService.Current().LoginInfo.UserCode.ToUpper();
            string message  = string.Empty;
            bool   r        = PickDoneService.SubmitButton(PickNo, CartonNo, Number, SN, UserCode, ISALL, false, out message);

            //拣料成功后清空箱号;
            //拆箱拣料时,拣料成功后,箱号、数量和SN都清空;

            if (r)
            {
                if (!string.IsNullOrEmpty(txtSN.Text))
                {
                    this.txtSN.Text = string.Empty;
                }
                if (!string.IsNullOrEmpty(txtNumber.Text) || this.rdoAllCarton.Checked)
                {
                    txtCartonNo.Text = string.Empty;
                }

                this.txtNumber.Text = string.Empty;
                //this.lblMessage.Text = "XXX";


                LoadGrid();
            }

            this.lblMessage.Text = message;
        }
Esempio n. 10
0
        private void btnApply_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(this.cboPickNo.Text))
            {
                MessageBox.Show("请先选择拣货任务令号");
                this.cboPickNo.Focus();
                return;
            }
            DataTable dt = new DataTable();

            dt.Columns.Add("PickNo", typeof(string));
            dt.Columns.Add("PickLine", typeof(string));
            //  int j = 0;
            //   string DQMCode = string.Empty;
            for (int i = 0; i < rows; i++)
            {
                if (this.dataGrid1[i, 0].ToString() == "√")
                {
                    dt.Rows.Add(this.dataGrid1[i, 6].ToString(), this.dataGrid1[i, 7].ToString());
                }
            }
            for (int j = 0; j < dt.Rows.Count; j++)
            {
                string result = PickDoneService.ApplyButton(dt.Rows[j][0].ToString(), dt.Rows[j][1].ToString(), ApplicationService.Current().LoginInfo.UserCode.ToUpper());
                this.lblMessage.Text = result;
            }
        }
Esempio n. 11
0
        //private void dataGrid1_CurrentCellChanged(object sender, EventArgs e)
        //{
        //    dataGrid1.Select(dataGrid1.CurrentRowIndex);
        //    if (dataGrid1[dataGrid1.CurrentRowIndex, 0].ToString() == "√")
        //    {
        //        dataGrid1[dataGrid1.CurrentRowIndex, 0] = "";
        //    }
        //    else
        //    {
        //        dataGrid1[dataGrid1.CurrentRowIndex, 0] = "√";
        //    }
        //}

        private void btnView_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(this.cboPickNo.Text))
            {
                MessageBox.Show("请先选择拣货任务令号");
                this.cboPickNo.Focus();
                return;
            }
            int    j       = 0;
            string DQMCode = string.Empty;

            for (int i = 0; i < rows; i++)
            {
                if (this.dataGrid1[i, 0].ToString() == "√")
                {
                    j      += 1;
                    DQMCode = this.dataGrid1[i, 2].ToString();
                }
            }
            if (j == 0)
            {
                MessageBox.Show("请勾选一笔记录进行查看");
                return;
            }
            if (j > 1)
            {
                MessageBox.Show("查看先进先出只能勾选一笔物料");
                return;
            }
            ApplicationService.Current().MaterInfo = new MaterInfo(this.cboPickNo.Text.ToUpper(), DQMCode);
            //FPickedView f = new FPickedView();
            //f.Show();

            try
            {
                Assembly assembly = null;
                string   typeName = "BenQGuru.eMES.WinCeClient.FPickedView";

                if (assembly == null)
                {
                    assembly = Assembly.Load("BenQGuru.eMES.WinCeClient");
                }
                object obj = assembly.CreateInstance(typeName);
                if (obj == null)
                {
                    MessageBox.Show("对象创建失败" + typeName);
                }


                if (obj is UserControl)
                {
                    //this.Parent.Controls.Clear();
                    UserControl uc = obj as UserControl;

                    (obj as FPickedView).fm = this;

                    uc.Dock      = DockStyle.Fill;
                    uc.BackColor = Color.White;
                    this.Visible = false;
                    this.Parent.Controls.Add(uc);
                    this.Text = "FPickedView";
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Esempio n. 12
0
        //包装箱号回车
        private void txtCartonNO_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == '\r')
            {
                if (!this.ValidateInput())
                {
                    return;
                }
                pickNo       = this.cmbPickNO.Text;
                gfHWItemCode = this.cmbGFHWItemCode.Text;
                gfPackingSEQ = this.cmbGFPackingSEQ.Text;
                suiteQTY     = this.txtSuiteQTY.Text.Trim();
                dqMCode      = this.cmbDQMCode.Text;

                cartonNo = this.txtCartonNO.Text.Trim().ToUpper();
                userCode = ApplicationService.Current().LoginInfo.UserCode.ToUpper();

                #region
                //if (this._PackagingOperationsService.QueryPickDetailMaterial(pickNo, cartonNo) == null)
                //{
                //    this.txtSN.Focus();
                //    this.btnPickNSNMaterial.Enabled = true;
                //    return;
                //}
                //else
                //{
                //    //1)	检查包装箱号在已拣物料明细表(TBLPICKDetailMaterial)对应拣货任务令明细表(TBLPICKDETAIL)中的光伏华为编码(TBLPICKDETAIL.GFHWITEMCODE)、光伏包装序号(TBLPICKDETAIL.GFPACKINGSEQ)与编辑区域中选择的光伏华为编码、光伏包装序号是否同等,如不相等则报错提示该箱号对应选择的光伏华为编码、光伏包装序号不相等
                //    if (!this._PackagingOperationsService.IsEqual(pickNo, cartonNo, gfHWItemCode, gfPackingSEQ))
                //    {
                //        this.lblMessage.Text = "该箱号对应选择的光伏华为编码、光伏包装序号不相等";
                //        return;
                //    }

                //    //2)	检查选择拣货任务令号、光伏华为编码、光伏包装序号在发货箱单明细物料信息表(TBLCartonInvDetailMaterial)中对应发货箱号条码(TBLCartonInvDetail.CARTONNO)的数量是否小于编辑区域输入的套件数,如小于则报错提示选择的拣货任务令号、光伏华为编码、光伏包装序号已包装的套件数已经大于等于输入套件数
                //    if (this._PackagingOperationsService.GetCartonNoCount(pickNo, gfHWItemCode, gfPackingSEQ) < suiteQTY)
                //    {
                //        this.lblMessage.Text = "选择的拣货任务令号、光伏华为编码、光伏包装序号已包装的套件数已经大于等于输入套件数";
                //        return;
                //    }

                //    //3)	检查包装箱号在已拣物料明细表(TBLPICKDetailMaterial)中PQTY不等于0时,则报错提显示该箱号已部分包装
                //    decimal pQty = this._PackagingOperationsService.QueryPickDetailMaterial_PQty(pickNo, cartonNo);
                //    if (pQty != 0)
                //    {
                //        this.lblMessage.Text = "该箱号已部分包装";
                //        this.txtCartonNO.Focus();
                //        return;
                //    }
                //    if (pQty == 0)
                //    {
                //        try
                //        {
                //            this._PackagingOperationsService.BeginTransaction();

                //            //1>	新增发货箱单明细信息表(TBLCartonInvDetail)数据
                //            this._PackagingOperationsService.AddCartonInvDetail(carInvNo, pickNo, "ClosePack", cartonNo, userCode);

                //            this._PackagingOperationsService.CommitTransaction();

                //            //2>	新增发货箱单明细物料信息表(TBLCartonInvDetailMaterial)数据
                //            this._PackagingOperationsService.AddCartonInvDetailMaterial(pickNo, cartonNo, carInvNo, userCode);

                //            //3>	新增发货箱单明细SN信息表(TBLCartonInvDetailSN)数据
                //            this._PackagingOperationsService.AddCARTONINVDETAILSN(pickNo, cartonNo, carInvNo, userCode);

                //            //4>	更新拣拣货任务令头表(TBLPICK)数据
                //            this._PackagingOperationsService.UpdatePick(pickNo, "Pack", userCode);

                //            //5>	更新拣货任务令明细表(TBLPICKDETAIL)数据
                //            this._PackagingOperationsService.UpdatePickdetail(pickNo, cartonNo, "ClosePack", -1, userCode);

                //            //6>	更新已拣物料明细表(TBLPICKDetailMaterial)数据
                //            this._PackagingOperationsService.UpdatePickdetailmaterial(pickNo, cartonNo, -1, userCode);

                //            //7>	当前包装箱号在发货箱单明细信息表(TBLCartonInvDetail)中的状态更新为:ClosePack:包装完成
                //            this._PackagingOperationsService.UpdateCartonInvDetail(carInvNo, cartonNo, "ClosePack", userCode);

                //            //8>	检查当前拣货任务令号在拣货任务令明细表(TBLPICKDETAIL)中所有记录SQTY=PQTY时,更新发货箱单号状态(TBLCartonInvoices .STATUS)为:ClosePack:包装完成
                //            this._PackagingOperationsService.UpdateCartonInvoices(pickNo, carInvNo, "ClosePack", userCode);

                //            this._PackagingOperationsService.CommitTransaction();
                //        }
                //        catch (Exception ex)
                //        {
                //            this.lblMessage.Text = ex.Message;
                //            this._PackagingOperationsService.RollbackTransaction();
                //        }
                //    }
                //}
                #endregion

                this.lblMessage.Text = this._PackagingOperationsService.GFCartonNOKeyPressReturnMessage(pickNo, gfHWItemCode, gfPackingSEQ, suiteQTY, dqMCode, cartonNo, userCode);

                string _str = this._PackagingOperationsService.GetString(pickNo);
                this.lblPQTY.Text = _str.Split(',')[0];
            }
        }
Esempio n. 13
0
        //接收
        private void btnReceive_Click(object sender, EventArgs e)
        {
            DataTable dt = new DataTable();

            dt.Columns.Add("Checked", typeof(string));
            dt.Columns.Add("STNO", typeof(string));
            dt.Columns.Add("STLINE", typeof(string));
            dt.TableName = "ExampleDataTable";

            for (int i = 0; i < DataCount; i++)
            {
                dt.Rows.Add(this.dataGrid1[i, 0], this.txtASNCode.Text, this.dataGrid1[i, 6]);
            }

            try
            {
                string result = asnService.ReceiveDetail(dt, this.txtASNCode.Text, cmbRejectResult.SelectedItem.ToString(), ApplicationService.Current().LoginInfo.UserCode.ToUpper());
                BindGrid(false);
                MessageBox.Show(result);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Esempio n. 14
0
        public FMenuTest()
        {
            InitializeComponent();

            FLogin formLogin = new FLogin();

            //if (formLogin.ShowDialog() == DialogResult.Yes)
            formLogin.ShowDialog();
            if (formLogin.Authenticated)
            {
                //测试菜单
                #region
                //daniel 2015/3/5 Test项主菜单
                //MenuItem testMainItem = new MenuItem();
                //testMainItem.Text = "模具出入库管理";
                //mainMenu.MenuItems.Add(testMainItem);

                //NewMenuItem menuItemInStore = new NewMenuItem();
                //menuItemInStore.Text = "模具入库管理";
                //menuItemInStore.MenuInfo = "BenQGuru.eMES.WinCeClient.FMoldInStore";
                //menuItemInStore.Click += new EventHandler(menuItem_Click);
                //testMainItem.MenuItems.Add(menuItemInStore);

                //NewMenuItem menuItemOutStore = new NewMenuItem();
                //menuItemOutStore.Text = "模具出库管理";
                //menuItemOutStore.MenuInfo = "BenQGuru.eMES.WinCeClient.FMoldOutStore";
                //menuItemOutStore.Click += new EventHandler(menuItem_Click);
                //testMainItem.MenuItems.Add(menuItemOutStore);
                //NewMenuItem menuItemOutDetail = new NewMenuItem();

                //NewMenuItem menuItemInDetail = new NewMenuItem();
                //menuItemInDetail.Text = "模具入库明细";
                //menuItemInDetail.MenuInfo = "BenQGuru.eMES.WinCeClient.FMoldInStoreDetail";
                //menuItemInDetail.Click += new EventHandler(menuItem_Click);
                //testMainItem.MenuItems.Add(menuItemInDetail);

                //menuItemOutDetail.Text = "模具出库明细";

                //menuItemOutDetail.MenuInfo = "BenQGuru.eMES.WinCeClient.FMoldOutStoreDetail";
                //menuItemOutDetail.Click += new EventHandler(menuItem_Click);
                //testMainItem.MenuItems.Add(menuItemOutDetail);
                #endregion

                //daniel 2015/3/17 获取WINCEPDA菜单,目前是两级菜单
                try
                {
                    DataTable dtMenu = formLogin.WebServiceFacade.GetAllMenuWithUrl(ApplicationService.Current().UserCode);
                    if (dtMenu != null && dtMenu.Rows.Count > 0)
                    {
                        DataRow[] pRows = dtMenu.Select(" PMENUCODE='WINCEPDA'");
                        if (pRows != null && pRows.Length > 0)
                        {
                            foreach (DataRow pItem in pRows)
                            {
                                MenuItem pMainItem = new MenuItem();
                                pMainItem.Text = pItem["MENUDESC"].ToString();
                                mainMenu.MenuItems.Add(pMainItem);
                                string    menucode = pItem["MENUCODE"].ToString();
                                DataRow[] subRows  = dtMenu.Select(string.Format(" PMENUCODE='{0}'", menucode));
                                if (subRows != null && subRows.Length > 0)
                                {
                                    foreach (DataRow item in subRows)
                                    {
                                        NewMenuItem menuItem = new NewMenuItem();
                                        menuItem.Text     = item["MENUDESC"].ToString();
                                        menuItem.MenuInfo = item["FORMURL"].ToString();
                                        menuItem.Click   += new EventHandler(menuItem_Click);
                                        pMainItem.MenuItems.Add(menuItem);
                                    }
                                }
                            }
                        }
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show("菜单获取失败,请重新登录 " + ex.Message, Enums.WinCE_MsgBox_Title_Tips);
                    Application.Exit();
                }

                //#endif
            }
            else
            {
                Application.Exit();
            }
        }
Esempio n. 15
0
        private void btnSubmit_Click(object sender, EventArgs e)
        {
            DataTable dt = new DataTable("ExampleDataTable");

            dt.Columns.Add("STNO", typeof(string));
            dt.Columns.Add("STLINE", typeof(string));

            btnSubmit.Enabled = false;

            for (int i = 0; i < rows; i++)
            {
                if (this.dataGrid1[i, 0].ToString() == "√")
                {
                    dt.Rows.Add(this.dataGrid1[i, 1].ToString(), this.dataGrid1[i, 6]);
                }
            }

            string result = MaterialOnShelvesService.OnShelves(dt, this.txtCartonNo.Text.ToUpper(), this.txtLocationNo.Text, ApplicationService.Current().LoginInfo.UserCode.ToUpper());

            btnSubmit.Enabled = true;
            MessageBox.Show(result);
            txtCartonNo.Text = string.Empty;
            QueryGrid();
        }
Esempio n. 16
0
        //SN回车
        private void txtSN_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == '\r')
            {
                if (!this.ValidateInput())
                {
                    return;
                }
                pickNo       = this.cmbPickNO.Text;
                gfHWItemCode = this.cmbGFHWItemCode.Text;
                gfPackingSEQ = this.cmbGFPackingSEQ.Text;
                suiteQTY     = this.txtSuiteQTY.Text.Trim();
                dqMCode      = this.cmbDQMCode.Text;
                dqsMCode     = this.drpDQSMCodeEdit.Text;
                cartonNo     = this.txtCartonNO.Text.Trim().ToUpper();
                sn           = this.txtSN.Text.Trim().ToUpper();
                userCode     = ApplicationService.Current().LoginInfo.UserCode.ToUpper();

                #region
                ////1.	检查SN条码是否存在当前拣货任务令号所在的已拣物料明细表SN信息表(TBLPICKDetailMaterialSN)中,不存在则报错提示刷入SN条码不存在
                //if (this._PackagingOperationsService.GetPickDetailMaterialSN(pickNo, sn) == null)
                //{
                //    this.lblMessage.Text = "刷入SN条码不存在";
                //    this.txtSN.Focus();
                //    return;
                //}

                ////2.	检查SN条码是否存在当前拣货任务令号对应发货箱单的发货箱单明细SN信息表(TBLCartonInvDetailSN)中,存在则报错提示刷入SN条码已包装过
                //if (this._PackagingOperationsService.GetCartonInvDetailSN(carInvNo, sn) != null)
                //{
                //    this.lblMessage.Text = "刷入SN条码已包装过";
                //    this.txtSN.Focus();
                //    return;
                //}

                ////3.	检查通过SN条码在已拣物料明细表SN信息表(TBLPICKDetailMaterialSN)中对应的箱号(TBLPICKDetailMaterialSN.CARTONNO)在已拣物料明细表(TBLPICKDetailMaterial)对应拣货任务令明细表(TBLPICKDETAIL)中的光伏华为编码(TBLPICKDETAIL.GFHWITEMCODE)、光伏包装序号(TBLPICKDETAIL.GFPACKINGSEQ)与编辑区域中选择的光伏华为编码、光伏包装序号是否同等,如不相等则报错提示该箱号对应选择的光伏华为编码、光伏包装序号不相等
                //if (!this._PackagingOperationsService._IsEqual(pickNo, sn, gfHWItemCode, gfPackingSEQ))
                //{
                //    this.lblMessage.Text = "该箱号对应选择的光伏华为编码、光伏包装序号不相等";
                //    return;
                //}

                ////4.	检查选择拣货任务令号、光伏华为编码、光伏包装序号在发货箱单明细物料信息表(TBLCartonInvDetailMaterial)中对应发货箱号条码(TBLCartonInvDetail.CARTONNO)的数量是否小于编辑区域输入的套件数,如小于则报错提示选择的拣货任务令号、光伏华为编码、光伏包装序号已包装的套件数已经大于等于输入套件数
                //if (this._PackagingOperationsService.GetCartonNoCount(pickNo, gfHWItemCode, gfPackingSEQ) < suiteQTY)
                //{
                //    this.lblMessage.Text = "选择的拣货任务令号、光伏华为编码、光伏包装序号已包装的套件数已经大于等于输入套件数";
                //    return;
                //}

                //try
                //{
                //    this._PackagingOperationsService.BeginTransaction();

                //    //5.	检查包装箱号是否存在当前拣货任务令号对应发货箱单的发货箱单明细信息表(TBLCartonInvDetail)中,不存在则新增发货箱单明细信息表(TBLCartonInvDetail)数据
                //    if (this._PackagingOperationsService.GetCartonInvDetail(carInvNo, cartonNo) == null)
                //    {
                //        this._PackagingOperationsService.AddCartonInvDetail(carInvNo, pickNo, "Pack", cartonNo, userCode);
                //    }

                //    //6.	检查包装箱号、鼎桥物料编码与刷入SN条码对应鼎桥物料编码相同的记录是否存在当前拣货任务令号对应发货箱单的发货箱单明细物料信息表(TBLCartonInvDetailMaterial)中
                //    //1>	存在则更新发货箱单明细物料信息表(TBLCartonInvDetailMaterial)数据
                //    //2>	不存则新增发货箱单明细物料信息表(TBLCartonInvDetailMaterial)数据

                //    //SN + [PICKNO]
                //    //->(已拣物料明细表SN信息)TBLPICKDetailMaterialSN.CARTONNO(原箱号) + [PICKNO]
                //    //->(已拣物料明细表)TBLPICKDetailMaterial.MCODE + CARTONNO(要包入的箱号) + [CARINVNO]
                //    //->(发货箱单明细物料信息)TBLCartonInvDetailMaterial
                //    this._PackagingOperationsService.OperateCartonInvDetailMaterial(pickNo, sn, carInvNo, cartonNo, userCode);

                //    //3>	新增发货箱单明细SN信息表(TBLCartonInvDetailSN)数据
                //    this._PackagingOperationsService.AddCARTONINVDETAILSN(pickNo, cartonNo, carInvNo, userCode);

                //    //4>	更新拣拣货任务令头表(TBLPICK)数据
                //    this._PackagingOperationsService.UpdatePick(pickNo, "Pack", userCode);

                //    //5>	更新拣货任务令明细表(TBLPICKDETAIL)数据
                //    this._PackagingOperationsService.UpdatePickdetail(pickNo, cartonNo, "ClosePack", 1, userCode);

                //    //6>	更新已拣物料明细表(TBLPICKDetailMaterial)数据
                //    this._PackagingOperationsService.UpdatePickdetailmaterial(pickNo, cartonNo, 1, userCode);

                //    this._PackagingOperationsService.CommitTransaction();
                //}
                //catch (Exception ex)
                //{
                //    this.lblMessage.Text = ex.Message;
                //    this._PackagingOperationsService.RollbackTransaction();
                //}
                #endregion
                string message = this._PackagingOperationsService.GFSNKeyPressReturnMessage(pickNo, gfHWItemCode, gfPackingSEQ, suiteQTY, dqMCode, dqsMCode, cartonNo, sn, userCode);
                if (message == "操作成功")
                {
                    txtSN.Text = string.Empty;
                    string _str = this._PackagingOperationsService.GetString(pickNo);
                    this.lblPQTY.Text = _str.Split(',')[0];
                }
                this.lblMessage.Text = message;
            }
        }
Esempio n. 17
0
        //public static DataTable GetCommand(string no, string statu)
        //{
        //    return new DataTable();
        //}

        public static DataTable GetCommand(string no, string statu, string invNo)
        {
            return(command.GetCommand(no, statu, invNo, ApplicationService.Current().LoginInfo.UserCode.ToUpper()));
        }
Esempio n. 18
0
        private void btnApplyOQC_Click_1(object sender, EventArgs e)
        {
            string message = this._PackagingOperationsService.ApplyOQC(this.lblCarInvNO.Text, cmbPickNO.SelectedItem.ToString(), ApplicationService.Current().LoginInfo.UserCode.ToUpper());

            MessageBox.Show(message);
        }
Esempio n. 19
0
        private void btnPackFinish_Click(object sender, EventArgs e)
        {
            string message = _PackagingOperationsService.PackFinish(cmbPickNO.SelectedItem.ToString(), ApplicationService.Current().LoginInfo.UserCode.ToUpper());

            MessageBox.Show(message);
        }
Esempio n. 20
0
        //提交
        private void btnSubmit_Click(object sender, EventArgs e)
        {
            if (!this.ValidateInput())
            {
                return;
            }
            iqcNo = this.cmbIQCNo.Text;
            string rejectionNum = this.lblRejectionNum.Text;
            bool   checkType    = true;

            if (this.rdbFullCheck.Checked)
            {
                checkType = true;
            }
            else
            {
                checkType = false;
            }

            if (!checkType && string.IsNullOrEmpty(cmbAQLStandard.SelectedItem.ToString()))
            {
                this.lblMessage.Text = "请选择一个AQL标准!";
                return;
            }


            this.lblMessage.Text = this._PackagingOperationsService.IQCCheckResultMPSubmitReturnMessage(iqcNo,
                                                                                                        checkType, cmbAQLStandard.SelectedItem.ToString(),
                                                                                                        rejectionNum
                                                                                                        , ApplicationService.Current().LoginInfo.UserCode.ToUpper());
            if (this.lblMessage.Text == "提交成功")
            {
                DataTable dt = this._PackagingOperationsService.GetIQCCheckResultMPDataGrid(this.cmbIQCNo.Text);
                BindDataGrid(dt);
            }
        }
Esempio n. 21
0
        //确认
        private void btnConfirm_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(this.txtQTY.Text.Trim()))
            {
                this.lblMessage.Text = "请输入包装数";
                return;
            }
            decimal _qty = decimal.Parse(dataGrid1[dataGrid1.CurrentRowIndex, 4].ToString());
            decimal qty  = decimal.Parse(this.txtQTY.Text.Trim());

            if (qty > _qty)
            {
                this.lblMessage.Text = "修改包装数不能大于默认显示包装数";
                return;
            }
            string dqMaterialNo = dataGrid1[dataGrid1.CurrentRowIndex, 2].ToString();
            string userCode     = ApplicationService.Current().LoginInfo.UserCode.ToUpper();

            try
            {
                this._PackagingOperationsService.BeginTransaction();

                //1.	检查包装箱号是否存在当前拣货任务令号对应发货箱单的发货箱单明细信息表(TBLCartonInvDetail)中,不存在则新增发货箱单明细信息表(TBLCartonInvDetail)数据
                if (this._PackagingOperationsService.GetCartonInvDetail(this.CarInvNo, this.CartonNo) == null)
                {
                    this._PackagingOperationsService.AddCartonInvDetail(this.CarInvNo, this.PickNo, "Pack", this.CartonNo, userCode);
                }

                //2.	检查包装箱号、鼎桥编码是否存在当前拣货任务令号对应发货箱单的发货箱单明细物料信息表(TBLCartonInvDetailMaterial)中
                //1)	存在则更新发货箱单明细物料信息表(TBLCartonInvDetailMaterial)数据
                //2)	不存则新增发货箱单明细物料信息表(TBLCartonInvDetailMaterial)数据
                if (this._PackagingOperationsService.QueryPickDetailMaterial(this.PickNo, this.CartonNo) == null)
                {
                    this._PackagingOperationsService._OperateCartonInvDetailMaterial(this.PickNo, this.CarInvNo, this.CartonNo, qty, userCode);
                }

                //3.	更新拣拣货任务令头表(TBLPICK)数据
                this._PackagingOperationsService.UpdatePick(this.PickNo, "Pack", userCode);

                //4.	更新拣货任务令明细表(TBLPICKDETAIL)数据
                //this._PackagingOperationsService.UpdatePickdetail(this.PickNo, this.CartonNo, "ClosePack", qty, userCode);

                //5.	更新已拣物料明细表(TBLPICKDetailMaterial)数据
                if (this._PackagingOperationsService.UpdatePickdetailmaterialAndGetQty(this.PickNo, dqMaterialNo, qty, userCode) > 0)
                {
                    this.lblMessage.Text = "输入的包装数过大";
                    this.txtQTY.Focus();
                    return;
                }

                this._PackagingOperationsService.CommitTransaction();

                this.lblMessage.Text = "提交成功";

                FPackagingOperations fPackagingOperations = new FPackagingOperations();
                fPackagingOperations.cmbPickNO_SelectedIndexChanged(null, null);

                this.Hide();
            }
            catch (Exception ex)
            {
                this.lblMessage.Text = "提交失败:" + ex.Message;
                this._PackagingOperationsService.RollbackTransaction();
            }
        }
Esempio n. 22
0
        public FPickedView()
        {
            //if (parent == null)
            //    throw new Exception("必须有一个父窗口!");
            //this.parent = parent;
            InitializeComponent();
            PickDoneService     = new BenQGuru.eMES.WinCeClient.PickDone.PickDone();
            PickDoneService.Url = WebServiceFacade.GetWebServiceURL() + "PickDone.asmx";
            DQMCode             = ApplicationService.Current().MaterInfo.DQMCode.ToUpper();
            PickNo = ApplicationService.Current().MaterInfo.PickNo.ToUpper();
            this.lblDQMCode.Text = DQMCode;

            DataTable dt1 = new DataTable();

            dt1 = PickDoneService.PickedView(PickNo, DQMCode);
            //rows = dt.Rows.Count;
            //this.dataGrid1.DataSource = dt1;
            if (dt1.Rows.Count > 0)
            {
                DataGridTableStyle ts = new DataGridTableStyle();
                ts.MappingName = dt1.TableName;

                DataGridColumnStyle ColStyle1 = new DataGridTextBoxColumn();
                ColStyle1.MappingName = dt1.Columns[0].ColumnName.ToString();
                ColStyle1.HeaderText  = "箱号";
                //ColStyle1.Width = 20;
                ts.GridColumnStyles.Add(ColStyle1);



                DataGridColumnStyle ColStyle5 = new DataGridTextBoxColumn();
                ColStyle5.MappingName = dt1.Columns[1].ColumnName.ToString();
                ColStyle5.HeaderText  = "SN";
                ts.GridColumnStyles.Add(ColStyle5);


                DataGridColumnStyle ColStyle6 = new DataGridTextBoxColumn();
                ColStyle6.MappingName = dt1.Columns[2].ColumnName.ToString();
                ColStyle6.HeaderText  = "拣料人";
                ts.GridColumnStyles.Add(ColStyle6);

                DataGridColumnStyle ColStyle7 = new DataGridTextBoxColumn();
                ColStyle7.MappingName = dt1.Columns[3].ColumnName.ToString();
                ColStyle7.HeaderText  = "日期";
                ts.GridColumnStyles.Add(ColStyle7);


                DataGridColumnStyle ColStyle3 = new DataGridTextBoxColumn();
                ColStyle3.MappingName = dt1.Columns[4].ColumnName.ToString();
                ColStyle3.HeaderText  = "批次号";
                ts.GridColumnStyles.Add(ColStyle3);

                DataGridColumnStyle ColStyle4 = new DataGridTextBoxColumn();
                ColStyle4.MappingName = dt1.Columns[5].ColumnName.ToString();
                ColStyle4.HeaderText  = "货位";
                ts.GridColumnStyles.Add(ColStyle4);

                this.dataGrid1.TableStyles.Clear();
                this.dataGrid1.TableStyles.Add(ts);

                this.dataGrid1.DataSource = dt1;
            }
        }
Esempio n. 23
0
 public static bool GetFirstCheck(string[] asns, out string message)
 {
     return(command.FirstCheckWithUser(asns, ApplicationService.Current().LoginInfo.UserCode.ToUpper(), out message));
 }