songnan.zhang
3 years ago
19 changed files with 1178 additions and 95 deletions
@ -0,0 +1,205 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using QMAPP.BLL; |
|||
using QMAPP.Entity; |
|||
using QMAPP.FJC.BLL.Dict; |
|||
using QMAPP.FJC.DAL.ProduceManage; |
|||
using QMAPP.FJC.Entity.ProduceManage; |
|||
using QMFrameWork.Data; |
|||
using QMFrameWork.Log; |
|||
using QMAPP.FJC.Entity; |
|||
using QMAPP.FJC.DAL.Operation; |
|||
using QMAPP.FJC.Entity.Operation; |
|||
|
|||
namespace QMAPP.FJC.BLL.Operation |
|||
{ |
|||
/// <summary>
|
|||
/// 模块名称:标记信息--佛山VW276
|
|||
/// 作 者:张松男
|
|||
/// 编写日期:2022年05月23日
|
|||
/// </summary>
|
|||
public class SignInfoBLL : BaseBLL |
|||
{ |
|||
#region 获取信息
|
|||
/// <summary>
|
|||
/// 获取信息
|
|||
/// </summary>
|
|||
/// <param name="">条件</param>
|
|||
/// <returns>信息</returns>
|
|||
public DataResult<SignInfo> Get(SignInfo model) |
|||
{ |
|||
DataResult<SignInfo> result = new DataResult<SignInfo>(); |
|||
try |
|||
{ |
|||
result.Result = new SignInfoDAL().Get(model); |
|||
result.IsSuccess = true; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
LogManager.LogHelper.Error(new LogInfo() |
|||
{ |
|||
ErrorInfo = ex, |
|||
Tag = ex.StackTrace, |
|||
Info = "获取异常!" |
|||
}); |
|||
result.IsSuccess = false; |
|||
result.Ex = ex; |
|||
result.Msg = "获取异常"; |
|||
} |
|||
|
|||
return result; |
|||
} |
|||
#endregion
|
|||
|
|||
#region 获取列表
|
|||
/// <summary>
|
|||
/// 获取列表
|
|||
/// </summary>
|
|||
/// <param name="condition">条件</param>
|
|||
/// <param name="page">数据页</param>
|
|||
/// <returns>数据页</returns>
|
|||
public DataResult<DataPage> GetList(SignInfo condition, DataPage page) |
|||
{ |
|||
DataResult<DataPage> result = new DataResult<DataPage>(); |
|||
try |
|||
{ |
|||
DataPage dataPage = new SignInfoDAL().GetList(condition, page); |
|||
|
|||
result.IsSuccess = true; |
|||
result.Result = dataPage; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
LogManager.LogHelper.Error(new LogInfo() |
|||
{ |
|||
ErrorInfo = ex, |
|||
Tag = ex.StackTrace, |
|||
Info = "获取列表异常!" |
|||
}); |
|||
result.IsSuccess = false; |
|||
result.Ex = ex; |
|||
result.Msg = "获取列表异常!"; |
|||
} |
|||
|
|||
return result; |
|||
} |
|||
|
|||
|
|||
/// <summary>
|
|||
/// 获取列表
|
|||
/// </summary>
|
|||
/// <param name="condition">条件</param>
|
|||
/// <returns>全部集合</returns>
|
|||
public List<SignInfo> GetAllList() |
|||
{ |
|||
try |
|||
{ |
|||
//获取信息列表
|
|||
return new SignInfoDAL().GetALL(); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
LogManager.LogHelper.Error(new LogInfo() |
|||
{ |
|||
ErrorInfo = ex, |
|||
Tag = ex.StackTrace, |
|||
Info = "获取列表异常!" |
|||
}); |
|||
throw ex; |
|||
} |
|||
} |
|||
|
|||
|
|||
#endregion
|
|||
|
|||
#region 插入信息
|
|||
/// <summary>
|
|||
/// 插入信息(单表)
|
|||
/// </summary>
|
|||
/// <param name="">信息</param>
|
|||
/// <returns>插入行数</returns>
|
|||
public DataResult<int> Insert(SignInfo info) |
|||
{ |
|||
DataResult<int> result = new DataResult<int>(); |
|||
try |
|||
{ |
|||
//基本信息
|
|||
info.PID = Guid.NewGuid().ToString(); |
|||
info.CREATEUSER = this.LoginUser.UserID; |
|||
info.CREATEDATE = DateTime.Now.ToString(); |
|||
SignInfoDAL cmdDAL = new SignInfoDAL(); |
|||
result.Result = cmdDAL.Insert(info); |
|||
result.IsSuccess = true; |
|||
return result; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 更新信息
|
|||
/// <summary>
|
|||
/// 更新信息
|
|||
/// </summary>
|
|||
/// <param name=""></param>
|
|||
/// <returns>更新行数</returns>
|
|||
public DataResult Update(SignInfo model) |
|||
{ |
|||
DataResult result = new DataResult(); |
|||
result.IsSuccess = true; |
|||
try |
|||
{ |
|||
SignInfo info = new SignInfoDAL().Get(model); |
|||
|
|||
//基本信息
|
|||
int temp = new SignInfoDAL().Update(info); |
|||
|
|||
if (temp == 0) |
|||
{ |
|||
result.IsSuccess = false; |
|||
result.Msg = "更新失败!"; |
|||
return result; |
|||
} |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
LogManager.LogHelper.Error(new LogInfo() |
|||
{ |
|||
ErrorInfo = ex, |
|||
Tag = ex.StackTrace, |
|||
Info = "更新异常!" |
|||
}); |
|||
result.IsSuccess = false; |
|||
result.Ex = ex; |
|||
result.Msg = "更新异常"; |
|||
} |
|||
return result; |
|||
} |
|||
#endregion
|
|||
|
|||
#region 删除
|
|||
|
|||
/// <summary>
|
|||
/// 删除信息
|
|||
/// </summary>
|
|||
/// <param name="">信息</param>
|
|||
/// <returns>删除个数</returns>
|
|||
public int Delete(string model) |
|||
{ |
|||
int count = 0; |
|||
try |
|||
{ |
|||
count = new SignInfoDAL().Delete(model); |
|||
return count; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
} |
|||
} |
@ -0,0 +1,310 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using QMAPP.FJC.Entity.MD; |
|||
using QMFrameWork.Data; |
|||
using System.Data; |
|||
using QMAPP.Entity; |
|||
using QMAPP.MD.Entity.Bucket; |
|||
using QMAPP.FJC.Entity.Operation; |
|||
|
|||
namespace QMAPP.FJC.DAL.Operation |
|||
{ |
|||
/// <summary>
|
|||
/// 模块名称:标记信息--佛山VW276
|
|||
/// 作 者:张松男
|
|||
/// 编写日期:2022年05月23日
|
|||
/// </summary>
|
|||
public class SignInfoDAL |
|||
{ |
|||
|
|||
#region 获取信息
|
|||
/// <summary>
|
|||
/// 获取信息
|
|||
/// </summary>
|
|||
/// <param name="">条件</param>
|
|||
/// <returns>*信息</returns>
|
|||
public SignInfo Get(SignInfo info) |
|||
{ |
|||
try |
|||
{ |
|||
using (IDataSession session = AppDataFactory.CreateMainSession()) |
|||
{ |
|||
//获取信息
|
|||
info = session.Get<SignInfo>(info); |
|||
} |
|||
return info; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 获取信息
|
|||
/// </summary>
|
|||
/// <param name="">条件</param>
|
|||
/// <returns>*信息</returns>
|
|||
public SignInfo Get(string materialcode) |
|||
{ |
|||
try |
|||
{ |
|||
string sql = "SELECT * FROM [T_AW_SignInfo] WHERE [MATERIAL_CODE]=@materialcode"; |
|||
List<DataParameter> parameters = new List<DataParameter>(); |
|||
parameters.Add(new DataParameter("materialcode", materialcode)); |
|||
using (IDataSession session = AppDataFactory.CreateMainSession()) |
|||
{ |
|||
//获取信息
|
|||
var info = session.Get<SignInfo>(sql, parameters.ToArray()); |
|||
return info; |
|||
} |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
#region 获取列表
|
|||
/// <summary>
|
|||
/// 获取列表
|
|||
/// </summary>
|
|||
/// <param name="condition">条件</param>
|
|||
/// <param name="page">数据页</param>
|
|||
/// <returns>数据页</returns>
|
|||
public DataPage GetList(SignInfo condition, DataPage page) |
|||
{ |
|||
string sql = null; |
|||
List<DataParameter> parameters = new List<DataParameter>(); |
|||
try |
|||
{ |
|||
sql = this.GetQuerySql(condition, ref parameters); |
|||
//分页关键字段及排序
|
|||
page.KeyName = "PID"; |
|||
if (string.IsNullOrEmpty(page.SortExpression)) |
|||
page.SortExpression = "UPDATEDATE DESC"; |
|||
using (IDataSession session = AppDataFactory.CreateMainSession()) |
|||
{ |
|||
page = session.GetDataPage<SignInfo>(sql, parameters.ToArray(), page); |
|||
} |
|||
return page; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 获取列表
|
|||
/// </summary>
|
|||
/// <param name="condition">条件</param>
|
|||
/// <param name="page">数据页</param>
|
|||
/// <returns>数据页</returns>
|
|||
public List<SignInfo> GetALL() |
|||
{ |
|||
string sql = null; |
|||
List<DataParameter> parameters = new List<DataParameter>(); |
|||
try |
|||
{ |
|||
sql = "SELECT * FROM T_AW_SignInfo WHERE IsCheck<> '1'"; |
|||
//分页关键字段及排序
|
|||
var LIST = new List<SignInfo>(); |
|||
using (IDataSession session = AppDataFactory.CreateMainSession()) |
|||
{ |
|||
LIST = session.GetList<SignInfo>(sql, parameters.ToArray()).ToList(); |
|||
} |
|||
return LIST; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 获取查询语句
|
|||
/// <summary>
|
|||
/// 获取查询语句
|
|||
/// </summary>
|
|||
/// <param name="user">查询条件</param>
|
|||
/// <param name="parameters">参数</param>
|
|||
/// <returns>查询语句</returns>
|
|||
private string GetQuerySql(SignInfo condition, ref List<DataParameter> parameters) |
|||
{ |
|||
StringBuilder sqlBuilder = new StringBuilder(); |
|||
StringBuilder whereBuilder = new StringBuilder(); |
|||
try |
|||
{ |
|||
|
|||
//构成查询语句
|
|||
sqlBuilder.Append("SELECT PID,ProductCode,Type,WorkLoc,CREATEUSER,CREATEDATE "); |
|||
sqlBuilder.Append("FROM T_AW_SignInfo "); |
|||
|
|||
if (string.IsNullOrEmpty(condition.ProductCode) == false) |
|||
{ |
|||
whereBuilder.Append(" AND ProductCode = @ProductCode"); |
|||
parameters.Add(new DataParameter { ParameterName = "ProductCode", DataType = DbType.String, Value = condition.ProductCode }); |
|||
} |
|||
if (string.IsNullOrEmpty(condition.Type) == false) |
|||
{ |
|||
whereBuilder.Append(" AND Type = @Type"); |
|||
parameters.Add(new DataParameter { ParameterName = "Type", DataType = DbType.String, Value = condition.Type }); |
|||
} |
|||
if (condition.BeginTime != DateTime.MinValue.ToString()) |
|||
{ |
|||
whereBuilder.Append(" AND CREATEDATE >= @BeginTime"); |
|||
parameters.Add(new DataParameter { ParameterName = "BeginTime", DataType = DbType.String, Value = condition.BeginTime }); |
|||
} |
|||
if (condition.EndTime != DateTime.MinValue.ToString()) |
|||
{ |
|||
whereBuilder.Append(" AND CREATEDATE <= @EndTime"); |
|||
parameters.Add(new DataParameter { ParameterName = "EndTime", DataType = DbType.String, Value = condition.EndTime }); |
|||
} |
|||
|
|||
//查询条件
|
|||
if (whereBuilder.Length > 0) |
|||
{ |
|||
sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); |
|||
} |
|||
return sqlBuilder.ToString(); |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
|
|||
|
|||
#region 信息是否重复
|
|||
/// <summary>
|
|||
/// 判断名称是否存在
|
|||
/// </summary>
|
|||
/// <param name="info"></param>
|
|||
/// <returns>true:已存在;fasel:不存在。</returns>
|
|||
public bool Exists(SignInfo info) |
|||
{ |
|||
StringBuilder sqlBuilder = new StringBuilder(); |
|||
StringBuilder whereBuilder = new StringBuilder(); |
|||
List<DataParameter> parameters = new List<DataParameter>(); |
|||
int count = 0; |
|||
try |
|||
{ |
|||
sqlBuilder.Append("SELECT COUNT(0) FROM T_AW_SignInfo"); |
|||
if (info.PID == null) |
|||
{ |
|||
info.PID = ""; |
|||
} |
|||
whereBuilder.Append(" AND PID <> @PID "); |
|||
parameters.Add(new DataParameter { ParameterName = "PID", DataType = DbType.String, Value = info.PID }); |
|||
|
|||
//添加进行无重复字段判断代码
|
|||
|
|||
if (whereBuilder.Length > 0) |
|||
{ |
|||
sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); |
|||
} |
|||
using (IDataSession session = AppDataFactory.CreateMainSession()) |
|||
{ |
|||
count = Convert.ToInt32(session.ExecuteSqlScalar(sqlBuilder.ToString(), parameters.ToArray())); |
|||
} |
|||
return count > 0; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 插入信息
|
|||
/// <summary>
|
|||
/// 插入信息(单表)
|
|||
/// </summary>
|
|||
/// <param name="">信息</param>
|
|||
/// <returns>插入行数</returns>
|
|||
public int Insert(SignInfo info) |
|||
{ |
|||
int count = 0; |
|||
try |
|||
{ |
|||
using (IDataSession session = AppDataFactory.CreateMainSession()) |
|||
{ |
|||
//插入基本信息
|
|||
count = session.Insert<SignInfo>(info); |
|||
} |
|||
return count; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 更新信息
|
|||
/// <summary>
|
|||
/// 更新信息
|
|||
/// </summary>
|
|||
/// <param name=""></param>
|
|||
/// <returns>更新行数</returns>
|
|||
public int Update(SignInfo info) |
|||
{ |
|||
int count = 0; |
|||
try |
|||
{ |
|||
using (IDataSession session = AppDataFactory.CreateMainSession()) |
|||
{ |
|||
//更新基本信息
|
|||
count = session.Update<SignInfo>(info); |
|||
} |
|||
return count; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
#region 逻辑删除
|
|||
/// <summary>
|
|||
/// 逻辑删除信息
|
|||
/// </summary>
|
|||
/// <param name=""></param>
|
|||
/// <returns>删除个数</returns>
|
|||
public int Delete(string info) |
|||
{ |
|||
StringBuilder sqlBuilder = new StringBuilder(); |
|||
List<DataParameter> parameters = new List<DataParameter>(); |
|||
int count = 0; |
|||
try |
|||
{ |
|||
using (IDataSession session = AppDataFactory.CreateMainSession()) |
|||
{ |
|||
//删除基本信息
|
|||
sqlBuilder.Append("UPDATE T_AW_SignInfo "); |
|||
sqlBuilder.Append("SET IsCheck = '1' "); |
|||
sqlBuilder.Append("WHERE PID = @PID "); |
|||
parameters.Add(new DataParameter { ParameterName = "PID", DataType = DbType.String, Value = info }); |
|||
count = session.ExecuteSql(sqlBuilder.ToString(), parameters.ToArray()); |
|||
} |
|||
return count; |
|||
} |
|||
catch (Exception ex) |
|||
{ |
|||
throw ex; |
|||
} |
|||
} |
|||
#endregion
|
|||
|
|||
|
|||
|
|||
} |
|||
} |
@ -0,0 +1,57 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using QMFrameWork.Data.Attributes; |
|||
using System.Data; |
|||
|
|||
namespace QMAPP.FJC.Entity.Operation |
|||
{ |
|||
/// <summary>
|
|||
/// 模块名称:标记信息--佛山VW276
|
|||
/// 作 者:张松男
|
|||
/// 编写日期:2022年05月23日
|
|||
/// </summary>
|
|||
[DBTable(TableName = "T_AW_SignInfo", TimeStampColumn = "CREATEDATE")] |
|||
public class SignInfo |
|||
{ |
|||
///<summary>
|
|||
///主键
|
|||
///</summary>
|
|||
[DBColumn(ColumnName = "PID", DataType = DbType.String, IsKey = true)] |
|||
public string PID { get; set; } |
|||
|
|||
///<summary>
|
|||
///标记条码
|
|||
///</summary>
|
|||
[DBColumn(ColumnName = "ProductCode", DataType = DbType.String)] |
|||
public string ProductCode { get; set; } |
|||
|
|||
///<summary>
|
|||
///标记类型
|
|||
///</summary>
|
|||
[DBColumn(ColumnName = "Type", DataType = DbType.String)] |
|||
public string Type { get; set; } |
|||
|
|||
///<summary>
|
|||
///标记工位
|
|||
///</summary>
|
|||
[DBColumn(ColumnName = "WorkLoc", DataType = DbType.String)] |
|||
public string WorkLoc { get; set; } |
|||
|
|||
///<summary>
|
|||
///标记用户
|
|||
///</summary>
|
|||
[DBColumn(ColumnName = "CREATEUSER", DataType = DbType.String)] |
|||
public string CREATEUSER { get; set; } |
|||
|
|||
///<summary>
|
|||
///标记时间
|
|||
///</summary>
|
|||
[DBColumn(ColumnName = "CREATEDATE", DataType = DbType.DateTime2)] |
|||
public string CREATEDATE { get; set; } |
|||
public string BeginTime { get; set; } |
|||
public string EndTime { get; set; } |
|||
|
|||
} |
|||
} |
@ -0,0 +1,201 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Data; |
|||
using System.Drawing; |
|||
using System.Windows.Forms; |
|||
using QMAPP.FJC.Entity.Operation; |
|||
using QMAPP.ServicesAgent; |
|||
using QMAPP.FJC.Entity.BZD; |
|||
using QMAPP.Entity; |
|||
|
|||
namespace QMAPP.WinForm.Forms.Operation |
|||
{ |
|||
public partial class SignInfoForm : Form |
|||
{ |
|||
//获取服务代理
|
|||
QMAPP.ServicesAgent.ServiceAgent _agent = ClientContext.GetServiceAgent(); |
|||
|
|||
List<BZDConfig> _bzdConfig = null; |
|||
|
|||
Product _CurrentProduct = null; |
|||
private OperationForm _parentForm; |
|||
private OperationForm_316 operationForm_316; |
|||
|
|||
public SignInfoForm(OperationForm parentForm) |
|||
{ |
|||
InitializeComponent(); |
|||
infolabel.Text = ""; |
|||
infolabel.ForeColor = Color.Red; |
|||
_parentForm = parentForm; |
|||
} |
|||
|
|||
public SignInfoForm(OperationForm_316 operationForm_316) |
|||
{ |
|||
this.operationForm_316 = operationForm_316; |
|||
} |
|||
|
|||
#region 打印按钮
|
|||
|
|||
/// <summary>
|
|||
/// 打印按钮
|
|||
/// </summary>
|
|||
/// <param name="sender"></param>
|
|||
/// <param name="e"></param>
|
|||
private void button1_Click(object sender, EventArgs e) |
|||
{ |
|||
try |
|||
{ |
|||
|
|||
if (string.IsNullOrWhiteSpace(cbMaterial.Text)) |
|||
{ |
|||
infolabel.Text = "请选择总成零件号!"; |
|||
cbMaterial.Focus(); |
|||
return; |
|||
} |
|||
|
|||
if (string.IsNullOrEmpty(txtMainCode.Text)) |
|||
{ |
|||
infolabel.Text = "请扫描或填写装配码!"; |
|||
|
|||
txtMainCode.Focus(); |
|||
return; |
|||
} |
|||
//*****************************
|
|||
var _Product = _agent.InvokeServiceFunction<BZDRecorder2>(B9IPCService.BZDRecorderBLL_GetRecord.ToString(), new BZDRecorder2() { PRODUCTCODE = txtMainCode.Text }); |
|||
|
|||
if (_Product == null) |
|||
{ |
|||
string BZDRule = ""; |
|||
DataTable dataTable = _agent.InvokeServiceFunction<DataTable>(B9IPCService.BZDConfigBLL_GetAppConfigValue.ToString(), "BZDRule"); |
|||
if (dataTable.Rows.Count > 0) |
|||
{ |
|||
BZDRule = dataTable.Rows[0]["Value"].ToString(); |
|||
} |
|||
if (string.IsNullOrEmpty(BZDRule)) |
|||
{ |
|||
MessageBox.Show("未配置总成规则!"); |
|||
return; |
|||
} |
|||
string MATERIAL_CODE = cbMaterial.Text.Split('|')[0]; |
|||
|
|||
if (System.Text.RegularExpressions.Regex.IsMatch(txtMainCode.Text, BZDRule)) |
|||
{ |
|||
//添加补打记录
|
|||
_agent.InvokeServiceFunction<int>(B9IPCService.BarCodeReplacementBLL_Insert.ToString(), new BarCodeReplacement() { ProductCode = txtMainCode.Text, Type = "BZD条码补打" }); |
|||
|
|||
_parentForm.planMATERIAL_CODE = MATERIAL_CODE; |
|||
_parentForm.processMainCode = txtMainCode.Text; |
|||
//_parentForm.cBoxVAN = false;
|
|||
|
|||
|
|||
|
|||
//添加T_AW_PRODUCT
|
|||
var ProductList = SelectProduct(txtMainCode.Text); |
|||
var PID = Guid.NewGuid().ToString(); |
|||
var ProductNew = new Product() |
|||
{ |
|||
PRODUCTCODE = txtMainCode.Text, |
|||
PID = PID, |
|||
//MACHINECODDE = _operationServiceParam.machineInfo.MACHINECODDE,
|
|||
//MACHINENAME = _operationServiceParam.machineInfo.MACHINENAME,
|
|||
PRODUCTSOURCE = "0", |
|||
MATERIAL_CODE = MATERIAL_CODE, |
|||
STATUS = "0", |
|||
OUTFLAG = "0", |
|||
USINGSTATE = "0", |
|||
CAPACITY = 1, |
|||
USINGCOUNT = 0, |
|||
//WORKCELL_CODE = ProductList.WORKCELL_CODE,
|
|||
//WORKLOC_CODE = ProductList.WORKLOC_CODE,
|
|||
//WORKCENTER_CODE = ProductList.WORKCENTER_CODE,
|
|||
WORKCENTER_CODE = "ASSLINE", |
|||
MATERIAL_TYPE = "IP_FINASSY" |
|||
}; |
|||
//_agent.InvokeServiceFunction<DataResult<int>>(B9BasicService.ProductBLL_Insert.ToString(), ProductNew);
|
|||
DataResult<int> result;//判断是否成功
|
|||
//result = _agent.InvokeServiceFunction<DataResult<int>>(B9BasicService.ProductBLL_Insert.ToString(), ProductNew);
|
|||
result = _agent.InvokeServiceFunction<DataResult<int>>(B9BasicService.ProductBLL_InsertForBundle.ToString(), ProductNew); |
|||
if (!result.IsSuccess) |
|||
{ |
|||
MessageBox.Show(result.Msg); |
|||
return; |
|||
} |
|||
|
|||
_parentForm.Print052QRCODE(false,txtMainCode.Text); |
|||
|
|||
} |
|||
else |
|||
{ |
|||
MessageBox.Show("条码规则不符合!"); |
|||
} |
|||
|
|||
} |
|||
else |
|||
MessageBox.Show("条码已存在!"); |
|||
} |
|||
catch (Exception exception) |
|||
{ |
|||
MessageBox.Show("打印失败!"); |
|||
throw; |
|||
} |
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
#region 查找Product
|
|||
/// <summary>
|
|||
/// 查找Product
|
|||
/// </summary>
|
|||
/// <returns></returns>
|
|||
public Product SelectProduct(string Products) |
|||
{ |
|||
var list = new List<string>(); |
|||
var ProductList = _agent.InvokeServiceFunction<Product>(B9IPCService.ProductBLL_Get.ToString(), new Product() { PRODUCTCODE = Products }); |
|||
return ProductList; |
|||
} |
|||
#endregion
|
|||
|
|||
#region 初始界面
|
|||
|
|||
/// <summary>
|
|||
///
|
|||
/// </summary>
|
|||
/// <param name="sender"></param>
|
|||
/// <param name="e"></param>
|
|||
private void PrintForm_Load(object sender, EventArgs e) |
|||
{ |
|||
_bzdConfig = |
|||
_agent.InvokeServiceFunction<List<BZDConfig>>(B9IPCService.BZDConfigBLL_GetAllList.ToString(),""); |
|||
foreach (var t in _bzdConfig) |
|||
{ |
|||
t.MATERIALCODDE = t.MATERIALCODDE + "|" + t.ColorDetail; |
|||
} |
|||
LoadAssyMaterial(); |
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
#region 加载总成物料
|
|||
|
|||
/// <summary>
|
|||
/// 加载总成物料
|
|||
/// </summary>
|
|||
private void LoadAssyMaterial() |
|||
{ |
|||
|
|||
//模腔号
|
|||
this.cbMaterial.DataSource = _bzdConfig; |
|||
this.cbMaterial.DisplayMember = "MATERIALCODDE"; |
|||
this.cbMaterial.ValueMember = "PID"; |
|||
} |
|||
|
|||
|
|||
|
|||
#endregion
|
|||
|
|||
private void label2_Click(object sender, EventArgs e) |
|||
{ |
|||
|
|||
} |
|||
} |
|||
} |
@ -0,0 +1,143 @@ |
|||
using System.Drawing; |
|||
|
|||
namespace QMAPP.WinForm.Forms.Operation |
|||
{ |
|||
partial class SignInfoForm |
|||
{ |
|||
/// <summary>
|
|||
/// Required designer variable.
|
|||
/// </summary>
|
|||
private System.ComponentModel.IContainer components = null; |
|||
|
|||
/// <summary>
|
|||
/// Clean up any resources being used.
|
|||
/// </summary>
|
|||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
|||
protected override void Dispose(bool disposing) |
|||
{ |
|||
if (disposing && (components != null)) |
|||
{ |
|||
components.Dispose(); |
|||
} |
|||
base.Dispose(disposing); |
|||
} |
|||
|
|||
#region Windows Form Designer generated code
|
|||
|
|||
/// <summary>
|
|||
/// Required method for Designer support - do not modify
|
|||
/// the contents of this method with the code editor.
|
|||
/// </summary>
|
|||
private void InitializeComponent() |
|||
{ |
|||
this.label1 = new System.Windows.Forms.Label(); |
|||
this.label3 = new System.Windows.Forms.Label(); |
|||
this.txtMainCode = new System.Windows.Forms.TextBox(); |
|||
this.button1 = new System.Windows.Forms.Button(); |
|||
this.infolabel = new System.Windows.Forms.Label(); |
|||
this.label5 = new System.Windows.Forms.Label(); |
|||
this.cbMaterial = new System.Windows.Forms.ComboBox(); |
|||
this.SuspendLayout(); |
|||
//
|
|||
// label1
|
|||
//
|
|||
this.label1.AutoSize = true; |
|||
this.label1.Font = new System.Drawing.Font("宋体", 27.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
|||
this.label1.Location = new System.Drawing.Point(204, 30); |
|||
this.label1.Name = "label1"; |
|||
this.label1.Size = new System.Drawing.Size(245, 37); |
|||
this.label1.TabIndex = 0; |
|||
this.label1.Text = "标记信息登记"; |
|||
//
|
|||
// label3
|
|||
//
|
|||
this.label3.AutoSize = true; |
|||
this.label3.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
|||
this.label3.Location = new System.Drawing.Point(27, 198); |
|||
this.label3.Name = "label3"; |
|||
this.label3.Size = new System.Drawing.Size(106, 24); |
|||
this.label3.TabIndex = 2; |
|||
this.label3.Text = "标记条码"; |
|||
//
|
|||
// txtMainCode
|
|||
//
|
|||
this.txtMainCode.BackColor = System.Drawing.SystemColors.Window; |
|||
this.txtMainCode.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
|||
this.txtMainCode.Location = new System.Drawing.Point(172, 187); |
|||
this.txtMainCode.Name = "txtMainCode"; |
|||
this.txtMainCode.Size = new System.Drawing.Size(416, 35); |
|||
this.txtMainCode.TabIndex = 4; |
|||
//
|
|||
// button1
|
|||
//
|
|||
this.button1.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
|||
this.button1.Location = new System.Drawing.Point(262, 254); |
|||
this.button1.Name = "button1"; |
|||
this.button1.Size = new System.Drawing.Size(206, 60); |
|||
this.button1.TabIndex = 5; |
|||
this.button1.Text = "提交"; |
|||
this.button1.UseVisualStyleBackColor = true; |
|||
this.button1.Click += new System.EventHandler(this.button1_Click); |
|||
//
|
|||
// infolabel
|
|||
//
|
|||
this.infolabel.AutoSize = true; |
|||
this.infolabel.Font = new System.Drawing.Font("微软雅黑", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
|||
this.infolabel.ForeColor = System.Drawing.Color.Red; |
|||
this.infolabel.Location = new System.Drawing.Point(50, 334); |
|||
this.infolabel.Name = "infolabel"; |
|||
this.infolabel.Size = new System.Drawing.Size(0, 31); |
|||
this.infolabel.TabIndex = 6; |
|||
//
|
|||
// label5
|
|||
//
|
|||
this.label5.AutoSize = true; |
|||
this.label5.Font = new System.Drawing.Font("宋体", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
|||
this.label5.Location = new System.Drawing.Point(27, 110); |
|||
this.label5.Name = "label5"; |
|||
this.label5.Size = new System.Drawing.Size(106, 24); |
|||
this.label5.TabIndex = 2; |
|||
this.label5.Text = "标记类型"; |
|||
//
|
|||
// cbMaterial
|
|||
//
|
|||
this.cbMaterial.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; |
|||
this.cbMaterial.Font = new System.Drawing.Font("微软雅黑", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); |
|||
this.cbMaterial.FormattingEnabled = true; |
|||
this.cbMaterial.Location = new System.Drawing.Point(173, 98); |
|||
this.cbMaterial.Name = "cbMaterial"; |
|||
this.cbMaterial.Size = new System.Drawing.Size(415, 36); |
|||
this.cbMaterial.TabIndex = 7; |
|||
//
|
|||
// SignInfoForm
|
|||
//
|
|||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); |
|||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; |
|||
this.ClientSize = new System.Drawing.Size(665, 399); |
|||
this.Controls.Add(this.cbMaterial); |
|||
this.Controls.Add(this.infolabel); |
|||
this.Controls.Add(this.button1); |
|||
this.Controls.Add(this.txtMainCode); |
|||
this.Controls.Add(this.label5); |
|||
this.Controls.Add(this.label3); |
|||
this.Controls.Add(this.label1); |
|||
this.Name = "SignInfoForm"; |
|||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; |
|||
this.Text = "标记信息登记"; |
|||
this.Load += new System.EventHandler(this.PrintForm_Load); |
|||
this.ResumeLayout(false); |
|||
this.PerformLayout(); |
|||
|
|||
} |
|||
|
|||
#endregion
|
|||
|
|||
private System.Windows.Forms.Label label1; |
|||
private System.Windows.Forms.Label label3; |
|||
private System.Windows.Forms.TextBox txtMainCode; |
|||
private System.Windows.Forms.Button button1; |
|||
private System.Windows.Forms.Label infolabel; |
|||
private System.Windows.Forms.Label label5; |
|||
private System.Windows.Forms.ComboBox cbMaterial; |
|||
} |
|||
} |
@ -0,0 +1,120 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<root> |
|||
<!-- |
|||
Microsoft ResX Schema |
|||
|
|||
Version 2.0 |
|||
|
|||
The primary goals of this format is to allow a simple XML format |
|||
that is mostly human readable. The generation and parsing of the |
|||
various data types are done through the TypeConverter classes |
|||
associated with the data types. |
|||
|
|||
Example: |
|||
|
|||
... ado.net/XML headers & schema ... |
|||
<resheader name="resmimetype">text/microsoft-resx</resheader> |
|||
<resheader name="version">2.0</resheader> |
|||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
|||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
|||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
|||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
|||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
|||
<value>[base64 mime encoded serialized .NET Framework object]</value> |
|||
</data> |
|||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
|||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
|||
<comment>This is a comment</comment> |
|||
</data> |
|||
|
|||
There are any number of "resheader" rows that contain simple |
|||
name/value pairs. |
|||
|
|||
Each data row contains a name, and value. The row also contains a |
|||
type or mimetype. Type corresponds to a .NET class that support |
|||
text/value conversion through the TypeConverter architecture. |
|||
Classes that don't support this are serialized and stored with the |
|||
mimetype set. |
|||
|
|||
The mimetype is used for serialized objects, and tells the |
|||
ResXResourceReader how to depersist the object. This is currently not |
|||
extensible. For a given mimetype the value must be set accordingly: |
|||
|
|||
Note - application/x-microsoft.net.object.binary.base64 is the format |
|||
that the ResXResourceWriter will generate, however the reader can |
|||
read any of the formats listed below. |
|||
|
|||
mimetype: application/x-microsoft.net.object.binary.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.soap.base64 |
|||
value : The object must be serialized with |
|||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
|||
: and then encoded with base64 encoding. |
|||
|
|||
mimetype: application/x-microsoft.net.object.bytearray.base64 |
|||
value : The object must be serialized into a byte array |
|||
: using a System.ComponentModel.TypeConverter |
|||
: and then encoded with base64 encoding. |
|||
--> |
|||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
|||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> |
|||
<xsd:element name="root" msdata:IsDataSet="true"> |
|||
<xsd:complexType> |
|||
<xsd:choice maxOccurs="unbounded"> |
|||
<xsd:element name="metadata"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" use="required" type="xsd:string" /> |
|||
<xsd:attribute name="type" type="xsd:string" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="assembly"> |
|||
<xsd:complexType> |
|||
<xsd:attribute name="alias" type="xsd:string" /> |
|||
<xsd:attribute name="name" type="xsd:string" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="data"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> |
|||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
|||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
|||
<xsd:attribute ref="xml:space" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
<xsd:element name="resheader"> |
|||
<xsd:complexType> |
|||
<xsd:sequence> |
|||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
|||
</xsd:sequence> |
|||
<xsd:attribute name="name" type="xsd:string" use="required" /> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:choice> |
|||
</xsd:complexType> |
|||
</xsd:element> |
|||
</xsd:schema> |
|||
<resheader name="resmimetype"> |
|||
<value>text/microsoft-resx</value> |
|||
</resheader> |
|||
<resheader name="version"> |
|||
<value>2.0</value> |
|||
</resheader> |
|||
<resheader name="reader"> |
|||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
<resheader name="writer"> |
|||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
|||
</resheader> |
|||
</root> |
Loading…
Reference in new issue