|
|
/////////////////////////////////////////////////////////////////
|
|
|
//
|
|
|
// (C) Copyright 2013, Kenneth, Inc.
|
|
|
// All rights reserved. Confidential. Except as pursuant
|
|
|
// to a written agreement with Kenneth, this software may
|
|
|
// not be used or distributed. This software may be covered
|
|
|
// by one or more patents.
|
|
|
//
|
|
|
// 本软件为 ** 公司开发,版权所有,违者必究,23810511@qq.com
|
|
|
//
|
|
|
/////////////////////////////////////////////////////////////////
|
|
|
|
|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
|
using System.Linq;
|
|
|
using System.Text;
|
|
|
using Newtonsoft.Json;
|
|
|
using Newtonsoft.Json.Linq;
|
|
|
using NPOI.HSSF.UserModel;
|
|
|
using NPOI.SS.UserModel;
|
|
|
using System.IO;
|
|
|
using System.Reflection;
|
|
|
using System.Data;
|
|
|
using System.Data.SqlClient;
|
|
|
using System.Transactions;
|
|
|
using QuiltingCommon;
|
|
|
using MySql.Data.MySqlClient;
|
|
|
|
|
|
namespace QuiltingBusiness
|
|
|
{
|
|
|
public partial class Testpart
|
|
|
{
|
|
|
private static void ConvertSingleData(TestpartEntityExtension data)
|
|
|
{
|
|
|
var user = SysUserPool.GetById(data.CreateBy);
|
|
|
if (user != null)
|
|
|
{
|
|
|
data.CreateByDisplayer = user.UserName;
|
|
|
}
|
|
|
user = SysUserPool.GetById(data.ModifyBy);
|
|
|
if (user != null)
|
|
|
{
|
|
|
data.ModifyByDisplayer = user.UserName;
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
public static string LoadParts(string currentUserId, string currentClientId, string currentSendParameter)
|
|
|
{
|
|
|
var rows = TestpartPool.BufferPool.OrderBy(o => o.PartIndex);
|
|
|
foreach (var row in rows)
|
|
|
{
|
|
|
ConvertSingleData(row);
|
|
|
}
|
|
|
|
|
|
OutEntity oe = new OutEntity() { ErrorCode = ErrorCode.Success, ReturnObj = JsonConvert.SerializeObject(rows) };
|
|
|
return JsonConvert.SerializeObject(oe);
|
|
|
}
|
|
|
}
|
|
|
}
|