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 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);
                    }
                }
            }
        }