Ejemplo n.º 1
0
        private async void ListViewDetele_PreviewMouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            ListView listView = sender as ListView; // = sender as ListBox;

            if (listView == null)
            {
                return;
            }

            if (listView.SelectedItem == null)
            {
                return;
            }

            SendBackMode sendBackMode = listView.SelectedItem as SendBackMode;

            //MetroDialogSettings metroDialogSettings = new MetroDialogSettings();
            //metroDialogSettings.AffirmativeButtonText = "删除";
            //metroDialogSettings.NegativeButtonText="放弃";
            MessageDialogResult messageResult = await this.ShowMessageAsync("出库数据详细信息", String.Format("二维码序号: {0}\n返回状态: {1}\n错误信息:{2}", sendBackMode.QrCode, sendBackMode.ResultStatus, sendBackMode.Errorinfo), MessageDialogStyle.AffirmativeAndNegative, new MetroDialogSettings()
            {
                AffirmativeButtonText = "删除", NegativeButtonText = "放弃"
            });

            if (messageResult == MessageDialogResult.Affirmative)
            {
                DeleteButton.Command.Execute(sendBackMode);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 扫码退货
        /// </summary>
        /// <param name="backcode"></param>
        public void ScanCodeSendback(string backcode)
        {
            //if (backcode.Length != 12)
            //{
            //    butContentStatusRe = new ButContentStatus()
            //    {
            //        packIconMaterialLight = ButContentStatus.AlertCircle,
            //        ErrorInfo = "请扫描正确的防伪码",
            //        ScanCount = sendBackModes.Count.ToString()
            //    };
            //    // ReErrorInfo = "请扫描正确防伪码";
            //   // return;
            //}
            SendBackMode sendBackMode = sendBackModes.Where(s => s.QrCode == backcode).FirstOrDefault();

            if (sendBackMode == null)
            {
                var remodel = WtdlSqlService.DeletetLabelX(backcode);
                if (remodel.ResulCode == 200)
                {
                    sendBackModes.Add(remodel);

                    butContentStatusRe = new ButContentStatus()
                    {
                        packIconMaterialLight = ButContentStatus.Check,
                        ErrorInfo             = "扫码退货成功",
                        ScanCount             = sendBackModes.Count.ToString()
                    };
                    //ReScanCount = sendBackModes.Count.ToString();
                    //ReErrorInfo = remodel.ResultStatus;
                }
                else
                {
                    butContentStatusRe = new ButContentStatus()
                    {
                        packIconMaterialLight = ButContentStatus.Alert,
                        ErrorInfo             = remodel.ResultStatus,
                        ScanCount             = sendBackModes.Count.ToString()
                    };
                    //ReScanCount = sendBackModes.Count.ToString();
                    //ReErrorInfo = remodel.ResultStatus;
                }
            }
            else
            {
                butContentStatusRe = new ButContentStatus()
                {
                    packIconMaterialLight = ButContentStatus.AlertCircle,
                    ErrorInfo             = "请不要重复扫码退货",
                    ScanCount             = sendBackModes.Count.ToString()
                };
                //ReScanCount = sendBackModes.Count.ToString();
                //ReErrorInfo = "请不要重复多次扫描二维码";
            }
        }
Ejemplo n.º 3
0
 public bool DeeleteSendBackMode(SendBackMode sendBackMode)
 {
     //var tLabelxcode = DbEntities.W_LabelStorage.Local.Where(o => o.QRCode == sendBackMode.QrCode).FirstOrDefault();
     //if(tLabelxcode!=null)
     //{
     //    return DbEntities.W_LabelStorage.Local.Remove(tLabelxcode);
     //}
     //else
     //{
     return(false);
     //}
 }
Ejemplo n.º 4
0
 public void DeScanCodeSendback(SendBackMode sendBackMode)
 {
     sendBackModes.Remove(sendBackMode);
 }