You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
78 lines
2.5 KiB
78 lines
2.5 KiB
2 years ago
|
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 - 4, 4);
|
||
|
data.ExcuteStander = sb.ToString();
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
this.DataContext = data;
|
||
|
if (data.IsLogo == 0)
|
||
|
{
|
||
|
is3c.Visibility = Visibility.Collapsed;
|
||
|
no3c.Visibility = Visibility.Visible;
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
is3c.Visibility = Visibility.Visible;
|
||
|
no3c.Visibility = Visibility.Collapsed;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|