Beispiel #1
0
        private void Forwarding_KeyPress(object sender, KeyPressEventArgs e)
        {
            productionNo += e.KeyChar.ToString().Replace("\r", "");
            BLL.T_JISA t_JISA = new BLL.T_JISA();

            if (e.KeyChar == 13)
            {
                BLL.T_Verifying t_Verifying = new BLL.T_Verifying();
                DataTable       dt          = t_Verifying.GetHZOrder();
                List <string>   product     = dt.AsEnumerable().Select(d => d.Field <string>("ProductNo")).ToList();


                if (product.Contains(productionNo))
                {
                    DataTable tt = t_JISA.GetJISA(2);
                    string    p  = tt.Rows[0]["ProductionNumber"].ToString();
                    if (p == productionNo)
                    {
                        t_JISA.SaveJISA(p, 2);
                        ShowEDIInfo();
                    }
                }
                else
                {
                    HZ hZ = new HZ("未找到生产号");
                    hZ.ShowDialog();
                }
            }
            this.scanTitle.Focus();
        }
Beispiel #2
0
        private void ShowEDIInfo()
        {
            this.EDIQueue.Controls.Clear();

            BLL.T_JISA t_JISA = new BLL.T_JISA();
            DataTable  dt     = t_JISA.GetJISA(2);

            if (dt != null)
            {
                if (dt.Rows.Count > 0)
                {
                    int locationX = 0;
                    int locationY = 0;

                    foreach (DataRow item in dt.Rows)
                    {
                        FZPrintControl fz = new FZPrintControl();
                        fz.Name         = item["ProductionNumber"].ToString();
                        fz.productNo    = item["ProductionNumber"].ToString();
                        fz.carType      = item["CarType"].ToString();
                        fz.carModelName = item["CarModelName"].ToString();

                        int state = t_JISA.GetJISAState(item["ProductionNumber"].ToString());
                        if (state == 1)
                        {
                            fz.FontColor = Color.Blue;
                        }
                        else
                        {
                            fz.FontColor = Color.Black;
                        }

                        fz.SetInfo(this.EDIQueue.Width, this.EDIQueue.Height / 12);
                        fz.Location = new Point(locationX, locationY);

                        this.EDIQueue.Controls.Add(fz);
                        locationY += fz.Height;
                    }
                }
            }
            else
            {
                MessageBox.Show("未找到JISA信息");
            }
        }
Beispiel #3
0
        private void print_Click(object sender, EventArgs e)
        {
            BLL.T_JISA           t_JISA           = new BLL.T_JISA();
            BLL.T_FZOrderConfirm t_FZOrderConfirm = new BLL.T_FZOrderConfirm();
            if (Model.FZOrderModel.ProductNo != null)
            {
                if (Model.FZOrderModel.ProductNo.Count > 0)
                {
                    foreach (string item in Model.FZOrderModel.ProductNo)
                    {
                        t_JISA.SaveFZOrderRecord(item);

                        string           ExcelPath1   = @"D:\左座椅分装单模板.xlsx";
                        DataTable        dtL          = t_JISA.GetFZOrderL(item);
                        string           ExcelPath2   = @"D:\右座椅分装单模板.xlsx";
                        DataTable        dtR          = t_JISA.GetFZOrderR(item);
                        BLL.PrintFZOrder printFZOrder = new BLL.PrintFZOrder();
                        if (dtL.Rows.Count > 0)
                        {
                            printFZOrder.PrintOrder(ExcelPath1, dtL, 0);
                            t_FZOrderConfirm.SaveFZOrderState(item, 1, 0);
                        }
                        else
                        {
                            HZ hz = new HZ("未找到左分装单");
                            hz.ShowDialog();
                        }

                        if (dtR.Rows.Count > 0)
                        {
                            printFZOrder.PrintOrder(ExcelPath2, dtR, 1);
                            t_FZOrderConfirm.SaveFZOrderState(item, 1, 1);
                        }
                        else
                        {
                            HZ hz = new HZ("未找到右分装单");
                            hz.ShowDialog();
                        }


                        t_JISA.SaveJISA(item, 1);
                    }
                }
            }
        }
Beispiel #4
0
 private void UserLogin_KeyPress(object sender, KeyPressEventArgs e)
 {
     userID += e.KeyChar.ToString().Replace("\r", "");
     if (e.KeyChar == 13)
     {
         BLL.T_JISA t_JISA = new BLL.T_JISA();
         string     user   = t_JISA.GetUserNamebyID(userID);
         if (!string.IsNullOrEmpty(user))
         {
             Model.EntruckModel.FaYunUser = user;
             this.labUser.Text            = user;
         }
         else
         {
             this.labUser.Text = "未找到员工信息";
         }
         userID = "";
     }
 }