|
|
|
using BBWY.Client.Models;
|
|
|
|
using BBWY.Controls;
|
|
|
|
using Org.BouncyCastle.Crypto.Tls;
|
|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Linq;
|
|
|
|
using System.Text;
|
|
|
|
using System.Windows;
|
|
|
|
using System.Windows.Controls;
|
|
|
|
using System.Windows.Data;
|
|
|
|
using System.Windows.Documents;
|
|
|
|
using System.Windows.Input;
|
|
|
|
using System.Windows.Media;
|
|
|
|
using System.Windows.Media.Imaging;
|
|
|
|
using System.Windows.Shapes;
|
|
|
|
|
|
|
|
namespace BBWY.Client.Views.PackTask
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// LookCerWindow.xaml 的交互逻辑
|
|
|
|
/// </summary>
|
|
|
|
public partial class LookCerWindow : BWindow
|
|
|
|
{
|
|
|
|
public LookCerWindow(CertificateModel certificate)
|
|
|
|
{
|
|
|
|
|
|
|
|
InitializeComponent();
|
|
|
|
CertificateModel data = new CertificateModel
|
|
|
|
{
|
|
|
|
Brand = certificate.Brand,
|
|
|
|
BrandName = certificate.BrandName,
|
|
|
|
ExcuteStander = certificate.ExcuteStander,
|
|
|
|
FactoryNumber = certificate.FactoryNumber,
|
|
|
|
IsLogo = certificate.IsLogo,
|
|
|
|
LabelModel = certificate.LabelModel,
|
|
|
|
ProductAdress = certificate.ProductAdress,
|
|
|
|
Id = certificate.Id,
|
|
|
|
ProductDate = certificate.ProductDate,
|
|
|
|
ProductNo = certificate.ProductNo,
|
|
|
|
ProductShop = certificate.ProductShop,
|
|
|
|
Shader = certificate.Shader,
|
|
|
|
SkuId = certificate.SkuId,
|
|
|
|
Reseller = certificate.Reseller
|
|
|
|
|
|
|
|
};
|
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
|
if (data.ExcuteStander.Contains(","))//有逗号就拆分
|
|
|
|
{
|
|
|
|
var excutes = data.ExcuteStander.Split(',', StringSplitOptions.RemoveEmptyEntries);
|
|
|
|
for (int i = 0; i < excutes.Count(); i++)
|
|
|
|
{
|
|
|
|
if (i % 2 == 0 && i > 0)//间隔两个换行
|
|
|
|
{
|
|
|
|
sb.Append("\r\n");
|
|
|
|
}
|
|
|
|
sb.Append(excutes[i]).Append(" ");
|
|
|
|
}
|
|
|
|
sb.Remove(sb.Length - 3, 3);
|
|
|
|
data.ExcuteStander = sb.ToString();
|
|
|
|
}
|
|
|
|
this.DataContext = data;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|