Ejemplo n.º 1
0
        private void BtnCancle_Click(object sender, RoutedEventArgs e)
        {
            if (DGTrayItemsDetail.Items.Count > 0 && DGTrayItemsDetail.SelectedItems.Count > 0)
            {
                List <string> cancleIds = DGTrayItemsDetail.SelectedCells.Where(i => ((Trays)i.Item).status != (int)TrayStatus.Cancled).Select(i => ((Trays)i.Item).trayId).Distinct().ToList <string>();

                if (cancleIds.Count > 0)
                {
                    ProcessMsg msg = packageStoreService.CancleStored(cancleIds);
                    if (msg.result)
                    {
                        string errorMsg = msg.GetMessage(ReturnCode.Warning).Trim();
                        if (errorMsg.Length > 0)
                        {
                            new InfoBoard(MsgLevel.Warning, errorMsg).ShowDialog();
                        }

                        new InfoBoard(MsgLevel.Successful, "取消成功!", 10000).ShowDialog();
                        BtnSearch_Click(sender, e);
                    }
                    else
                    {
                        new InfoBoard(MsgLevel.Warning, msg.GetAllLevelMsgs()).ShowDialog();
                    }
                }
                else
                {
                    new InfoBoard(MsgLevel.Warning, "请选择未取消托盘").ShowDialog();
                }
            }
        }
Ejemplo n.º 2
0
        private void BtnFinsh_Click(object sender, RoutedEventArgs e)
        {
            if (TBWarehouse.Text.Length > 0 && TBPosition.Text.Length > 0)
            {
                if (int.Parse(LabPackNum.Content.ToString()) > 0)
                {
                    if (SPDataSource != null)
                    {
                        ProcessMsg msg = packageStoreService.CompleteStore(SPDataSource.Select(t => t.packageID).ToList <string>(), TBWarehouse.Text, TBPosition.Text.ToString());

                        if (msg.result)
                        {
                            string errorMsg = msg.GetMessage(ReturnCode.Warning).Trim();
                            if (errorMsg.Length > 0)
                            {
                                new InfoBoard(MsgLevel.Warning, errorMsg).ShowDialog();
                            }
                            TBTrayId.Text         = msg.GetMessage(ReturnCode.OK).Trim();
                            TBPackageId.IsEnabled = false;
                            BtnFinsh.IsEnabled    = false;
                            BtnRePrint.IsEnabled  = true;
                            BtnNew.IsEnabled      = true;
                            bool?print = new InfoBoard(MsgLevel.Successful, "入库成功,是否打印包装箱标签?\n标签号为:" + TBTrayId.Text).ShowDialog();
                            if ((bool)print)
                            {
                                this.PrintTrayLabel(TBTrayId.Text);
                            }
                        }
                        else
                        {
                            new InfoBoard(MsgLevel.Warning, msg.GetAllLevelMsgs()).ShowDialog();
                        }
                    }
                }
                else
                {
                    new InfoBoard(MsgLevel.Warning, "未开始入库!").ShowDialog();
                }
            }
            else
            {
                new InfoBoard(MsgLevel.Warning, "未输入仓库或库位!").ShowDialog();
            }
        }