diff --git a/CK.SCP.Controller/ASNController.cs b/CK.SCP.Controller/ASNController.cs deleted file mode 100644 index ec46575..0000000 --- a/CK.SCP.Controller/ASNController.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using CK.SCP.Models; -using CK.SCP.Models.ScpEntity; - -namespace CK.SCP.Controller -{ - public class ASNController - { - public static TF_ASN GetDetaillistByuid(int uid) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - return db.TF_ASN.SingleOrDefault(p => p.UID == uid); - } - } - - public static TF_ASN GetASNlist(string billnum, string vendid) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - return db.TF_ASN.SingleOrDefault(p => p.PoBillNum == billnum && p.VendId == vendid); - } - } - public static TF_ASN_DETAIL GetASNlistDetail(string billnum) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - return db.TF_ASN_DETAIL.SingleOrDefault(p => p.PoBillNum == billnum); - } - } - public static TF_ASN_DETAIL GetASNlistDetailByLine(string billnum, int linenum) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - return db.TF_ASN_DETAIL.SingleOrDefault(p => p.BillNum == billnum && p.PoLineNum == linenum); - } - } - } -} diff --git a/CK.SCP.Controller/BaseDocContoller.cs b/CK.SCP.Controller/BaseDocContoller.cs deleted file mode 100644 index 0b66180..0000000 --- a/CK.SCP.Controller/BaseDocContoller.cs +++ /dev/null @@ -1,114 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Data.Entity; -using System.Data.Entity.Core.Common.CommandTrees; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -using System.Data.Entity.Migrations; -using System.Linq.Expressions; -using CK.SCP.Models; - - -namespace CK.SCP.Controller -{ - public static class EntitiesHelper - { - - public static List GetModeList_genaral(Expression> select, - Expression> where, Expression> order, out int count) - where T : class - { - List list = null; - count = 0; - using (DbContext db = EntitiesFactory.CreateScpInstance()) - { - count = db.Set().Where(where).Count(); - list = - db.Set() - .Where(where) - .OrderBy(order) - .Select(select).ToList(); - } - return list; - } - - public static List GetPagedModelListAsc(Expression> select, - Expression> where, Expression> order, int pageIndex, int pageSize, out int total) - where T : class - { - List list = null; - total = 0; - using (DbContext db = EntitiesFactory.CreateScpInstance()) - { - total = db.Set().Where(where).Count(); - list = - db.Set() - .Where(where) - .OrderBy(order) - .Select(select) - .Skip((pageIndex - 1) * pageSize) - .Take(pageSize).ToList(); - } - return list; - } - - public static List GetPagedDataAsc(Expression> select, - Expression> where, Expression> order, int pageIndex, int pageSize, out int total) - where T : class - { - List list = null; - total = 0; - using (DbContext db = EntitiesFactory.CreateScpInstance()) - { - total = db.Set().Where(where.Compile()).AsQueryable().Count(); - list = - db.Set() - .Where(where.Compile()).AsQueryable() - .OrderBy(order) - .Select(select) - .Skip((pageIndex - 1) * pageSize) - .Take(pageSize).ToList(); - } - return list; - } - - //TODO 分页 原来 pageIndex-1 - public static List GetPagedDataDesc(DbContext db, Expression> select, - Expression> where, Expression> order, int pageIndex, int pageSize, out int total) - where T : class - { - List list = null; - total = 0; - - total = db.Set().Where(where).Count(); - list = - db.Set() - .Where(where) - .OrderByDescending(order) - .Select(select) - .Skip((pageIndex) * pageSize) - .Take(pageSize).ToList(); - - - return list; - } - public static List GetPagedList(DbContext db, Expression> order, int pageIndex, int pageSize, out int total) - where T : class - { - List list = null; - total = 0; - - total = db.Set().Count(); - list = - db.Set() - .OrderByDescending(order) - .Skip((pageIndex) * pageSize) - .Take(pageSize).ToList(); - - - return list; - } - } -} diff --git a/CK.SCP.Controller/CK.SCP.Controller.csproj b/CK.SCP.Controller/CK.SCP.Controller.csproj deleted file mode 100644 index e0b9acd..0000000 --- a/CK.SCP.Controller/CK.SCP.Controller.csproj +++ /dev/null @@ -1,99 +0,0 @@ - - - - - Debug - AnyCPU - {0C706E36-C79D-467C-91CA-DDF39BC43113} - Library - Properties - CK.SCP.Controller - CK.SCP.Controller - v4.5.2 - 512 - - - true - full - false - ..\DLL\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - ..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll - - - ..\packages\EntityFramework.Extensions.0.0.2\lib\net40\EntityFramework.Extensions.dll - - - ..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {dd7c0def-71e7-443f-b0b7-db2f5b12a506} - CK.SCP.Models - - - {74DCE5F2-A501-45F2-B4F9-494AA1867226} - Models - - - - - - - - - \ No newline at end of file diff --git a/CK.SCP.Controller/Class1.cs b/CK.SCP.Controller/Class1.cs deleted file mode 100644 index f33df14..0000000 --- a/CK.SCP.Controller/Class1.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace CK.SCP.Controller -{ - public class Class1 - { - } -} diff --git a/CK.SCP.Controller/InfoController.cs b/CK.SCP.Controller/InfoController.cs deleted file mode 100644 index b9d0957..0000000 --- a/CK.SCP.Controller/InfoController.cs +++ /dev/null @@ -1,59 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Data.Entity.Migrations; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using CK.SCP.Models; -using CK.SCP.Models.ScpEntity; - - -namespace CK.SCP.Controller -{ - public class InfoController - { - public static bool SaveInfo(TA_Info model) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - db.TA_Info.AddOrUpdate(model); - db.SaveChanges(); - } - return true; - } - - public static bool UpdateInfo(TA_Info model) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - db.TA_Info.AddOrUpdate(p => p.ID, model); - db.SaveChanges(); - } - return true; - } - public static TA_Info GetlistByBillNo(int id) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - return db.TA_Info.SingleOrDefault(p => p.ID == id); - } - } - public static V_Info GetInfoByBillNo(int id) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - return db.V_Info.SingleOrDefault(p => p.ID == id); - } - } - - public static void DeleteById(int id) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - var info = db.TA_Info.SingleOrDefault(p => p.ID == id); - if (info != null) db.TA_Info.Remove(info); - db.SaveChanges(); - } - } - } -} diff --git a/CK.SCP.Controller/InvoiceController.cs b/CK.SCP.Controller/InvoiceController.cs deleted file mode 100644 index b3c3727..0000000 --- a/CK.SCP.Controller/InvoiceController.cs +++ /dev/null @@ -1,85 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Data.Entity.Migrations; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using CK.SCP.Models; -using CK.SCP.Models.ScpEntity; - - -namespace CK.SCP.Controller -{ - public class InvoiceController - { - public static List GetDataByBillInvoice( string billnum) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - return db.V_BillInvoice.Where(p => p.BillNum == billnum).ToList(); - } - } - - - public static V_BillInvoice GetDataByBillInvoiceDetailModel(string billnum) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - return db.V_BillInvoice.SingleOrDefault(p => p.BillNum == billnum); - } - } - - public static bool UpdateData(int state, TB_INVOICE model) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - model.State = state; - - db.TB_INVOICE.AddOrUpdate(p => p.UID, model); - EntitiesFactory.SaveDb(db); - } - return true; - } - public static bool UpdateDataRemark(string remark, TB_INVOICE model) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - - model.Remark = remark; - - db.TB_INVOICE.AddOrUpdate(p => p.UID, model); - EntitiesFactory.SaveDb(db); - } - return true; - } - - public static bool UpdateDataReason(string remark, string billnum) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - TB_INVOICE model = new TB_INVOICE - { - Remark = remark, - BillNum = billnum - }; - db.TB_INVOICE.AddOrUpdate(p => p.BillNum, model); - } - return true; - } - public static TB_INVOICE GetDataByBillInvoiceBillNum(string id) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - return db.TB_INVOICE.SingleOrDefault(p => p.BillNum == id); - } - } - - public static V_BillInvoice GetBillInvoiceByBillNum(string id) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - return db.V_BillInvoice.SingleOrDefault(p => p.BillNum == id); - } - } - } -} diff --git a/CK.SCP.Controller/InvoiceDetailController.cs b/CK.SCP.Controller/InvoiceDetailController.cs deleted file mode 100644 index 9f53b4d..0000000 --- a/CK.SCP.Controller/InvoiceDetailController.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using CK.SCP.Models; -using CK.SCP.Models.ScpEntity; - - -namespace CK.SCP.Controller -{ - public class InvoiceDetailController - { - public static List GetDataByBillInvoiceDetail(string billnum) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - return db.V_BillInvoiceDetail.Where(p => p.BillNum == billnum).ToList(); - } - } - - public static V_BillInvoiceDetail GetDataByBillInvoiceDetailModel(string billnum) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - return db.V_BillInvoiceDetail.SingleOrDefault(p => p.BillNum == billnum); - } - } - public static V_BillInvoiceDetail GetDataByBillInvoiceDetailBillNum(string id) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - return db.V_BillInvoiceDetail.SingleOrDefault(p => p.BillNum == id); - } - } - } -} diff --git a/CK.SCP.Controller/OadOrderController.cs b/CK.SCP.Controller/OadOrderController.cs deleted file mode 100644 index b7fd682..0000000 --- a/CK.SCP.Controller/OadOrderController.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using CK.SCP.Models; -using CK.SCP.Models.ScpEntity; - -namespace CK.SCP.Controller -{ - public class OadOrderController - { -// public List GetList() -// { -// using (ScpEntities db = EntitiesFactory.CreateScpInstance()) -// { -// // db.TB_QadOrder.Where(p=>p.BillNo==db.) -// var query = db.TB_QadOrder.Join(db.TB_QadOrderDetail, a => a.BillNo, g => g.BillNo, (a, g) => new -// { -// a.BillNo, -// a.SupplierCode, -// a.StartDate, -// a.Address, -// a.ProductCode, -// a.Qty, -// }).ToList(); -//// return query; -// // return db.V_BillInvoice.Where(p => p.BillNum == billnum).ToList(); -// -// } -// } - } -} diff --git a/CK.SCP.Controller/POController.cs b/CK.SCP.Controller/POController.cs deleted file mode 100644 index 481dde4..0000000 --- a/CK.SCP.Controller/POController.cs +++ /dev/null @@ -1,115 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Data; -using System.Data.Entity.Migrations; -using System.Data.SqlClient; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using CK.SCP.Models; -using CK.SCP.Models.Enums; -using CK.SCP.Models.ScpEntity; - - -namespace CK.SCP.Controller -{ - public class POController - { - public static List Getlist() - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - return db.V_POAll.ToList(); - } - } - public static bool UpdatePOState(TF_PO model) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - db.TF_PO.AddOrUpdate(p => p.UID, model); - EntitiesFactory.SaveDb(db); - } - return true; - } - - public static TF_PO GetlistByID(int uid) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - return db.TF_PO.SingleOrDefault(p => p.UID == uid); - } - } - - public static TF_PO GetlistByBillNum(string billnum) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - return db.TF_PO.SingleOrDefault(p => p.BillNum == billnum); - } - } - public static V_POAll GetPOAlllistByBillNum(string billnum) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - return db.V_POAll.SingleOrDefault(p => p.BillNum == billnum); - } - } - public static void UpdateOrderByUID(int state, int uid) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - TF_PO model = new TF_PO(); - model.State = state; - model.UID = uid; - db.SaveChanges(); - } - } - - public static void UpdatePOOBybillno(TF_PO model) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - model.State = (int)PlanState.Confirm; - - db.TF_PO.AddOrUpdate(p => p.UID, model); - db.SaveChanges(); - } - } - public static List GetlistByBillNum(V_POAll model) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - return db.V_POAll.Where(p => p.BillNum == model.BillNum).ToList(); - } - } - public static TF_PO GetASNlist(string billnum, string vendid) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - return db.TF_PO.SingleOrDefault(p => p.BillNum == billnum && p.VendId == vendid); - } - } - public static TF_PO GetPOModel(int id) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - return db.TF_PO.SingleOrDefault(p => p.UID == id); - } - } - public static List GetASNlist() - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - return db.TF_PO.ToList(); - } - } - public static void DeletePO(TF_PO model) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - db.TF_PO.Remove(model); - db.SaveChanges(); - } - } - } -} diff --git a/CK.SCP.Controller/PODetailController.cs b/CK.SCP.Controller/PODetailController.cs deleted file mode 100644 index 68951d7..0000000 --- a/CK.SCP.Controller/PODetailController.cs +++ /dev/null @@ -1,68 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using CK.SCP.Models; -using CK.SCP.Models.ScpEntity; - - -namespace CK.SCP.Controller -{ - public class PODetailController - { - public static V_POAllDetail GetlistByBillNum(string billnum) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - return db.V_POAllDetail.SingleOrDefault(p => p.BillNum == billnum); - } - } - - public static TA_VENDER GetlistBySupplierCode(string VendId) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - return db.TA_VENDER.SingleOrDefault(p => p.VendId == VendId); - } - } - - public static List GetDetaillistByBillNum(string billnum) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - return db.TF_PO_DETAIL.Where(p => p.BillNum == billnum).ToList(); - } - } - - public static TF_PO_DETAIL GetDetaillistByuid(int uid) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - return db.TF_PO_DETAIL.SingleOrDefault(p => p.UID == uid); - } - } - public static List GetDetaillistBybillnos(string billno) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - return db.TF_PO_DETAIL.Where(p => p.BillNum == billno).ToList(); - } - } - public static void Delete(TF_PO_DETAIL model) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - db.TF_PO_DETAIL.Remove(model); - } - } - public static TF_PO_DETAIL GetDetaillistBybillidandline(string bill, int linenum) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - return db.TF_PO_DETAIL.SingleOrDefault(p => p.BillNum == bill && p.ErpLineNum == linenum); - } - } - } -} - diff --git a/CK.SCP.Controller/PartController.cs b/CK.SCP.Controller/PartController.cs deleted file mode 100644 index 518ddb6..0000000 --- a/CK.SCP.Controller/PartController.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using CK.SCP.Models; -using CK.SCP.Models.ScpEntity; - - -namespace CK.SCP.Controller -{ - public class PartController - { - public static List Getlist() - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - return db.TA_PART.ToList(); - } - } - public static List GetlistByPartCode(TA_PART model) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - return db.TA_PART.Where(p=>p.PartCode==model.PartCode).ToList(); - } - } - } -} diff --git a/CK.SCP.Controller/PlanMonthController.cs b/CK.SCP.Controller/PlanMonthController.cs deleted file mode 100644 index 6ae3765..0000000 --- a/CK.SCP.Controller/PlanMonthController.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Data.Entity.Migrations; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using CK.SCP.Models; -using CK.SCP.Models.ScpEntity; - - -namespace CK.SCP.Controller -{ - public class PlanMonthController - { - public static TB_PlanMonth GetPlanMonthById(int id) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - return db.TB_PlanMonth.SingleOrDefault(p => p.ID == id); - } - } - - public static bool UpdatePlanMonthById(TB_PlanMonth model) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - model.IsSend = "是"; - model.SendTime = DateTime.Now; - db.TB_PlanMonth.AddOrUpdate(model); - db.SaveChanges(); - } - return true; - } - public static TA_VENDER GetVend() - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - return db.TA_VENDER.OrderByDescending(p => p.Email).SingleOrDefault(p => p.Email != null); - } - } - - public static List GetVendList() - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - return db.TA_VENDER.ToList(); - } - } - - public static bool SaveTbPlanMonth(TB_PlanMonth model) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - db.TB_PlanMonth.AddOrUpdate(model); - db.SaveChanges(); - } - return true; - } - } -} diff --git a/CK.SCP.Controller/Properties/AssemblyInfo.cs b/CK.SCP.Controller/Properties/AssemblyInfo.cs deleted file mode 100644 index ab041bf..0000000 --- a/CK.SCP.Controller/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// 有关程序集的一般信息由以下 -// 控制。更改这些特性值可修改 -// 与程序集关联的信息。 -[assembly: AssemblyTitle("CK.SCP.CK.SCP.Controller")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("CK.SCP.CK.SCP.Controller")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2018")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -//将 ComVisible 设置为 false 将使此程序集中的类型 -//对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型, -//请将此类型的 ComVisible 特性设置为 true。 -[assembly: ComVisible(false)] - -// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID -[assembly: Guid("0c706e36-c79d-467c-91ca-ddf39bc43113")] - -// 程序集的版本信息由下列四个值组成: -// -// 主版本 -// 次版本 -// 生成号 -// 修订号 -// -//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, -// 方法是按如下所示使用“*”: : -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/CK.SCP.Controller/PublicDataController.cs b/CK.SCP.Controller/PublicDataController.cs deleted file mode 100644 index e0839fb..0000000 --- a/CK.SCP.Controller/PublicDataController.cs +++ /dev/null @@ -1,54 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Data.Entity.Migrations; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using CK.SCP.Models; -using CK.SCP.Models.ScpEntity; - - -namespace CK.SCP.Controller -{ - public class PublicDataController - { - public static TB_PublicData GetlistByBillNo(int id) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - return db.TB_PublicData.SingleOrDefault(p => p.ID == id); - } - } - public static bool SaveInfo(TB_PublicData model) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - db.TB_PublicData.AddOrUpdate(model); - db.SaveChanges(); - } - return true; - } - - - public static bool UpdateInfo(TB_PublicData model) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - db.TB_PublicData.AddOrUpdate(p => p.ID, model); - db.SaveChanges(); - } - return true; - } - - public static void DeleteById(int id) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - var info = db.TB_PublicData.SingleOrDefault(p => p.ID == id); - if (info != null) db.TB_PublicData.Remove(info); - db.SaveChanges(); - } - } - } - -} diff --git a/CK.SCP.Controller/ReceiveController.cs b/CK.SCP.Controller/ReceiveController.cs deleted file mode 100644 index 43ef80b..0000000 --- a/CK.SCP.Controller/ReceiveController.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using CK.SCP.Models; -using CK.SCP.Models.ScpEntity; - - -namespace CK.SCP.Controller -{ - public class ReceiveController - { - public static V_Receive GetlistByBillNum(string billnum) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - return db.V_Receive.SingleOrDefault(p => p.BillNum == billnum); - } - } - } -} diff --git a/CK.SCP.Controller/ReceiveDetailController.cs b/CK.SCP.Controller/ReceiveDetailController.cs deleted file mode 100644 index ce6ab9a..0000000 --- a/CK.SCP.Controller/ReceiveDetailController.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Data.Entity.Migrations; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using CK.SCP.Models; -using CK.SCP.Models.ScpEntity; - - -namespace CK.SCP.Controller -{ - public class ReceiveDetailController - { - public static V_ReceiveDetail GetlistByBillNum(string billnum) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - return db.V_ReceiveDetail.SingleOrDefault(p => p.BillNum == billnum); - } - } - - public static bool UpdateReceive(V_ReceiveDetail model) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - db.V_ReceiveDetail.AddOrUpdate(p => p.UID, model); - EntitiesFactory.SaveDb(db); - } - return true; - } - } -} diff --git a/CK.SCP.Controller/ResultObject.cs b/CK.SCP.Controller/ResultObject.cs deleted file mode 100644 index 270f538..0000000 --- a/CK.SCP.Controller/ResultObject.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace CK.SCP.Controller -{ -/// -///返回结果类 -/// -/// - public class ResultObject - { - public ResultObject() - { - ErrorList = new List(); - } - /// - /// 返回结果 - /// - public T Result { set; get; } - /// - /// 错误列表 - /// - public List ErrorList { set; get; } - /// - /// 返回状态 - /// - public ReturnStatus State - {private set; get; } - } - public enum ReturnStatus - { - [Description("失败")] - Failed, - [Description("成功")] - Succeed - - } -} diff --git a/CK.SCP.Controller/ShipController.cs b/CK.SCP.Controller/ShipController.cs deleted file mode 100644 index 87fed15..0000000 --- a/CK.SCP.Controller/ShipController.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using CK.SCP.Models; - - -namespace CK.SCP.Controller -{ - public class ShipController - { - public static void DeleteById(int id) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - var asn = db.TF_ASN.SingleOrDefault(p => p.UID == id); - if (asn != null) db.TF_ASN.Remove(asn); - db.SaveChanges(); - } - } - } -} diff --git a/CK.SCP.Controller/ShipDetailController.cs b/CK.SCP.Controller/ShipDetailController.cs deleted file mode 100644 index 40435df..0000000 --- a/CK.SCP.Controller/ShipDetailController.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Data.Entity.Migrations; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using CK.SCP.Models; -using CK.SCP.Models.ScpEntity; - - -namespace CK.SCP.Controller -{ - public class ShipDetailController - { - public static V_BillShipDetail GetlistByBillNum(string billnum) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - return db.V_BillShipDetail.SingleOrDefault(p => p.BillNum == billnum); - } - } - - public static V_BillShip GetBillShiplistByBillNo(string billnum) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - return db.V_BillShip.SingleOrDefault(p => p.Bill == billnum); - } - } - - public static TF_ASN GetlistByBillNo(string billnum) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - return db.TF_ASN.SingleOrDefault(p => p.BillNum == billnum); - } - } - public static TF_ASN_DETAIL GetDeatillistByBillNo(string billnum) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - return db.TF_ASN_DETAIL.SingleOrDefault(p => p.BillNum == billnum); - } - } - public static bool UpdateShip(TF_ASN model) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - db.TF_ASN.AddOrUpdate(p => p.UID, model); - - EntitiesFactory.SaveDb(db); - } - return true; - - } - } -} diff --git a/CK.SCP.Controller/SupplierController.cs b/CK.SCP.Controller/SupplierController.cs deleted file mode 100644 index 558e4a0..0000000 --- a/CK.SCP.Controller/SupplierController.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Data; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using CK.SCP.Models; -using CK.SCP.Models.ScpEntity; - - - -namespace CK.SCP.Controller -{ - public class SupplierController - { - public static List GetlistByName(TA_VENDER model) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - return db.TA_VENDER.Where(p => p.VendName == model.VendName).ToList(); - } - } - public static List Getlist() - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - return db.TA_VENDER.ToList(); - } - } - - } -} diff --git a/CK.SCP.Controller/SupplierPartController.cs b/CK.SCP.Controller/SupplierPartController.cs deleted file mode 100644 index 773337f..0000000 --- a/CK.SCP.Controller/SupplierPartController.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using CK.SCP.Models; -using CK.SCP.Models.ScpEntity; - - -namespace CK.SCP.Controller -{ - public class SupplierPartController - { -// public static List Getlist() -// { -// using (ScpEntities db = EntitiesFactory.CreateScpInstance()) -// { -// return db.V_VenderPart.ToList(); -// } -// } -// public static List GetlistByPartCode(V_VenderPart model) -// { -// using (ScpEntities db = EntitiesFactory.CreateScpInstance()) -// { -// return db.V_VenderPart.Where(p => p.PartCode == model.PartCode).ToList(); -// } -// } - } -} diff --git a/CK.SCP.Controller/UniApiController.cs b/CK.SCP.Controller/UniApiController.cs deleted file mode 100644 index 96a1117..0000000 --- a/CK.SCP.Controller/UniApiController.cs +++ /dev/null @@ -1,253 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using CK.SCP.Models; -using CK.SCP.Models.Enums; -using CK.SCP.Models.ScpEntity; -using CK.SCP.Models.UniApiEntity; - -namespace CK.SCP.Controller -{ - public static class UniApiController - { - - public static void RemoveList(ScpEntities db, List uniApiList) - { - db.TS_UNI_API.RemoveRange(uniApiList); - } - public static void AddHisList(ScpEntities db, List uniApiHisList) - { - - db.TS_UNI_API_HIS.AddRange(uniApiHisList); - } - - public static void AddApiData(ScpEntities wdb, TS_UNI_API apiData) - { - wdb.TS_UNI_API.Add(apiData); - } - - - public static void AddApiDataList(ScpEntities wdb, List apiDataList) - { - wdb.TS_UNI_API.AddRange(apiDataList); - } - - - public static WmsTableName GetTableName(UniApiType uniApiType) - { - WmsTableName tableName; - switch (uniApiType) - { - case UniApiType.PO: - tableName = WmsTableName.TS_UNI_API;//中间表的名字 - break; - case UniApiType.Receive: - tableName = WmsTableName.TS_UNI_API; - break; - case UniApiType.BarCode: - tableName = WmsTableName.TS_UNI_API; - break; - case UniApiType.Invoice: - tableName = WmsTableName.TS_UNI_API; - break; - default: - throw new ArgumentOutOfRangeException(nameof(uniApiType), uniApiType, null); - } - return tableName; - } - - //创建采购订单 - public static TS_UNI_API CreateBy(TF_PO bill, TF_PO_DETAIL detail, UniApiType uniApiType) - { - var tableName = GetTableName(uniApiType); - var apiData = new TS_UNI_API - { - InterfaceType = uniApiType.ToString(), - TableName = tableName.ToString(), - BillNum = bill.BillNum, - PartCode = detail.PartCode, - Batch = "", - Qty = detail.BillQty, - PoUnit = detail.PoUnit, - LocUnit = detail.LocUnit, - State = detail.State, - CreateOper = bill.OperName, - CreateTime = bill.BillTime, - PutTime = ScpCache.GetServerTime(), - VendId = bill.VendId, - BillType = (int)BillType.PuchaseOrder, - SubBillType = 0, - ValidDate = detail.DueDate, - ErpBillNum = bill.ErpBillNum, - ErpLineNum = detail.ErpLineNum, - VendBatch = "", - SourceBillNum = "", - Price = detail.Price, - PackQty = detail.PackQty, - Currency = detail.Currency, - Attn = "",//TODO - Buyer = bill.Buyer, - BuyerPhone = bill.BuyerPhone, - ModType = bill.ModType, - Receiver = "",//TODO - UmConv = (decimal)detail.UmConv, - }; - return apiData; - } - - private static ScpEntities db = EntitiesFactory.CreateScpInstance(); - public static TS_UNI_API CreateBy(TF_PO bill, List detail, UniApiType uniApiType) - { - var tableName = GetTableName(uniApiType); - TS_UNI_API asp = new TS_UNI_API(); - foreach (var item in detail) - { - asp.InterfaceType = uniApiType.ToString(); - asp.TableName = tableName.ToString(); - - asp.BillNum = bill.BillNum; - asp.Batch = string.Empty; - asp.CreateOper = bill.OperName; - asp.CreateTime = bill.BillTime; - asp.PutTime = ScpCache.GetServerTime(); - asp.VendId = bill.VendId; - asp.BillType = (int)BillType.PO; - asp.SubBillType = 0; - asp.VendBatch = string.Empty; - asp.SourceBillNum = string.Empty; - asp.Attn = "";//TODO - asp.Buyer = bill.Buyer; - asp.BuyerPhone = bill.BuyerPhone; - asp.ModType = bill.ModType; - asp.Receiver = "";//TODO - asp.PartCode = item.PartCode; - - asp.Qty = item.BillQty; - asp.PoUnit = item.PoUnit; - asp.LocUnit = item.LocUnit; - asp.State = item.State; - - asp.ValidDate = item.DueDate; - asp.ErpBillNum = bill.BillNum;//暂时跟billnum 一样 后期可能会改 预留 - asp.ErpLineNum = item.ErpLineNum; - - asp.Price = item.Price; - asp.PackQty = item.PackQty; - asp.Currency = item.Currency; - - asp.UmConv = (decimal)item.UmConv; - - db.TS_UNI_API.Add(asp); - db.SaveChanges(); - } - - return asp; - } - - //创建发货单 - public static TS_UNI_API CreateBy(TF_ASN bill, TF_ASN_DETAIL detail, UniApiType uniApiType) - { - var tableName = GetTableName(uniApiType); - var apiData = new TS_UNI_API - { - InterfaceType = uniApiType.ToString(), - TableName = tableName.ToString(), - BillNum = bill.BillNum, - PartCode = detail.PartCode, - Batch = detail.Batch, - Qty = detail.BillQty, - PoUnit = detail.PoUnit, - LocUnit = detail.LocUnit, - State = detail.State, - CreateOper = bill.OperName, - CreateTime = bill.BillTime, - PutTime = ScpCache.GetServerTime(), - VendId = bill.VendId, - BillType = (int)BillType.PuchaseOrder, - SubBillType = 0, - ValidDate = detail.ProduceDate, - ErpBillNum = bill.PoBillNum, - ErpLineNum = detail.PoLineNum, - VendBatch = detail.VendBatch, - Price = detail.Price, - PackQty = detail.PackQty, - Currency = detail.Currency, - UmConv = (decimal) detail.UmConv, - }; - return apiData; - } - - //创建条码 - public static TS_UNI_API CreateBy(TF_ASN bill, TS_BARCODE detail, UniApiType uniApiType) - { - var tableName = GetTableName(uniApiType); - var apiData = new TS_UNI_API - { - Barcode = detail.BarCode, - InterfaceType = uniApiType.ToString(), - TableName = tableName.ToString(), - BillNum = bill.BillNum, - PartCode = detail.PartCode, - Batch = detail.Batch, - Qty = detail.Qty, - PoUnit = detail.PoUnit, - LocUnit = detail.LocUnit, - State = detail.State, - CreateOper = bill.OperName, - CreateTime = bill.BillTime, - PutTime = ScpCache.GetServerTime(), - VendId = bill.VendId, - BillType = (int)BillType.PuchaseOrder, - SubBillType = 0, - ValidDate = detail.ProduceDate, - ErpBillNum = bill.PoBillNum, - ErpLineNum = detail.PoBillLine, - VendBatch = detail.VendBatch, - SourceBillNum = detail.FullBarCode, - PackQty = detail.PackQty, - }; - return apiData; - } - - //创建发票 - public static TS_UNI_API CreateBy(TB_INVOICE bill, TB_INVOICE_DETAIL detail, UniApiType uniApiType) - { - var tableName = GetTableName(uniApiType); - var apiData = new TS_UNI_API - { - InterfaceType = uniApiType.ToString(), - TableName = tableName.ToString(), - BillNum = bill.BillNum, - PartCode = detail.PartCode, - Batch = "", - Qty = detail.Qty, - PoUnit = detail.PoUnit, - LocUnit = detail.LocUnit, - State = detail.State, - CreateOper = bill.OperName, - CreateTime = bill.BillTime, - PutTime = ScpCache.GetServerTime(), - VendId = bill.VendId, - BillType = (int)BillType.PuchaseOrder, - SubBillType = 0, - ValidDate = detail.ProduceDate, - ErpBillNum = detail.PoBillNum, - ErpLineNum = detail.PoLineNum, - VendBatch = "", - SourceBillNum = "", - Price = detail.Price, - PackQty = detail.PackQty, - Currency = detail.Currency, - Invoice = bill.InvoiceNum, - Tax = detail.Tax, - TaxAmt = detail.TaxAmt, - }; - return apiData; - } - - public static List GetNewInterfaceList(ScpEntities wdb) - { - return wdb.TS_UNI_API.Where(p => p.State == (int)BillState.New).OrderBy(p => p.UID).ToList(); - } - } -} \ No newline at end of file diff --git a/CK.SCP.Controller/UserController.cs b/CK.SCP.Controller/UserController.cs deleted file mode 100644 index 004fb3a..0000000 --- a/CK.SCP.Controller/UserController.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - - -namespace CK.SCP.Controller -{ - public class UserController - { - - } -} diff --git a/CK.SCP.Controller/VEND_USERController.cs b/CK.SCP.Controller/VEND_USERController.cs deleted file mode 100644 index a8a73a4..0000000 --- a/CK.SCP.Controller/VEND_USERController.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using CK.SCP.Models; -using CK.SCP.Models.ScpEntity; - -namespace CK.SCP.Controller -{ - public class VEND_USERController - { - public static TA_VEND_USER GetVendUserModel(int id) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - return db.TA_VEND_USER.SingleOrDefault(p => p.UID == id); - } - } - } -} diff --git a/CK.SCP.Controller/app.config b/CK.SCP.Controller/app.config deleted file mode 100644 index 23349b1..0000000 --- a/CK.SCP.Controller/app.config +++ /dev/null @@ -1,25 +0,0 @@ - - - - -
- - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/CK.SCP.Controller/packages.config b/CK.SCP.Controller/packages.config deleted file mode 100644 index 33e13d6..0000000 --- a/CK.SCP.Controller/packages.config +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/CK.SCP.Models/App.config b/CK.SCP.Models/App.config deleted file mode 100644 index d696498..0000000 --- a/CK.SCP.Models/App.config +++ /dev/null @@ -1,20 +0,0 @@ - - - - -
- - - - - - - - - - - - - - - \ No newline at end of file diff --git a/CK.SCP.Models/AppBoxEntity/AppBoxContext.cs b/CK.SCP.Models/AppBoxEntity/AppBoxContext.cs deleted file mode 100644 index abe3209..0000000 --- a/CK.SCP.Models/AppBoxEntity/AppBoxContext.cs +++ /dev/null @@ -1,94 +0,0 @@ -using System.Data.Entity; - -namespace CK.SCP.Models.AppBoxEntity -{ - public class AppBoxContext : DbContext - { - public AppBoxContext() : base(EntitiesFactory.GetEfConnectionString(GlobalConfig.AppBoxDatabase)) - { - - } - - public AppBoxContext(string strConn) : base(strConn) - { - - } - - public DbSet Configs { get; set; } - public DbSet Depts { get; set; } - public DbSet Users { get; set; } - public DbSet Roles { get; set; } - public DbSet Titles { get; set; } - public DbSet<Online> Onlines { get; set; } - public DbSet<Log> Logs { get; set; } - public DbSet<Power> Powers { get; set; } - public DbSet<Menu> Menus { get; set; } - - protected override void OnModelCreating(DbModelBuilder modelBuilder) - { - base.OnModelCreating(modelBuilder); - - - modelBuilder.Entity<Role>() - .HasMany(r => r.Users) - .WithMany(u => u.Roles) - .Map(x => x.ToTable("RoleUsers") - .MapLeftKey("RoleID") - .MapRightKey("UserID")); - - modelBuilder.Entity<Title>() - .HasMany(t => t.Users) - .WithMany(u => u.Titles) - .Map(x => x.ToTable("TitleUsers") - .MapLeftKey("TitleID") - .MapRightKey("UserID")); - - modelBuilder.Entity<Dept>() - .HasOptional(d => d.Parent) - .WithMany(d => d.Children) - .Map(x => x.MapKey("ParentID")); - - modelBuilder.Entity<Dept>() - .HasMany(d => d.Users) - .WithOptional(u => u.Dept) - .Map(x => x.MapKey("DeptID")); - - modelBuilder.Entity<Online>() - .HasRequired(o => o.User) - .WithMany() - .Map(x => x.MapKey("UserID")); - - modelBuilder.Entity<Menu>() - .HasOptional(m => m.Parent) - .WithMany(m => m.Children) - .Map(x => x.MapKey("ParentID")); - - //modelBuilder.Entity<Menu>() - // .HasOptional(m => m.Module) - // .WithMany() - // .Map(x => x.MapKey("ModuleID")); - - //modelBuilder.Entity<Module>() - // .HasMany(m => m.ModulePowers) - // .WithRequired(mp => mp.Module); - - //modelBuilder.Entity<Power>() - // .HasMany(p => p.ModulePowers) - // .WithRequired(mp => mp.Power); - - modelBuilder.Entity<Menu>() - .HasOptional(m => m.ViewPower) - .WithMany() - .Map(x => x.MapKey("ViewPowerID")); - - modelBuilder.Entity<Role>() - .HasMany(r => r.Powers) - .WithMany(p => p.Roles) - .Map(x => x.ToTable("RolePowers") - .MapLeftKey("RoleID") - .MapRightKey("PowerID")); - - - } - } -} \ No newline at end of file diff --git a/CK.SCP.Models/AppBoxEntity/AppBoxDatabaseInitializer.cs b/CK.SCP.Models/AppBoxEntity/AppBoxDatabaseInitializer.cs deleted file mode 100644 index ea78572..0000000 --- a/CK.SCP.Models/AppBoxEntity/AppBoxDatabaseInitializer.cs +++ /dev/null @@ -1,686 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Data.Entity; -using System.Linq; - -namespace CK.SCP.Models.AppBoxEntity -{ - public class AppBoxDatabaseInitializer : DropCreateDatabaseIfModelChanges<AppBoxContext> // DropCreateDatabaseAlways<AppBoxContext> DropCreateDatabaseIfModelChanges<AppBoxContext> - { - protected override void Seed(AppBoxContext context) - { - GetConfigs().ForEach(c => context.Configs.Add(c)); - GetDepts().ForEach(d => context.Depts.Add(d)); - GetUsers().ForEach(u => context.Users.Add(u)); - - GetRoles().ForEach(r => context.Roles.Add(r)); - GetPowers().ForEach(p => context.Powers.Add(p)); - GetTitles().ForEach(t => context.Titles.Add(t)); - - context.SaveChanges(); - // 添加菜单时需要指定ViewPower,所以上面需要先保存到数据库 - GetMenus(context).ForEach(m => context.Menus.Add(m)); - } - - private static List<Menu> GetMenus(AppBoxContext context) - { - var menus = new List<Menu> { - new Menu - { - Name = "系统管理", - SortIndex = 1, - Remark = "顶级菜单", - Children = new List<Menu> { - new Menu - { - Name = "用户管理", - SortIndex = 10, - Remark = "二级菜单", - NavigateUrl = "~/admin/user.aspx", - ImageUrl = "~/res/icon/tag_blue.png", - ViewPower = context.Powers.Where(p => p.Name == "CoreUserView").FirstOrDefault<Power>() - }, - new Menu - { - Name = "职称管理", - SortIndex = 20, - Remark = "二级菜单", - NavigateUrl = "~/admin/title.aspx", - ImageUrl = "~/res/icon/tag_blue.png", - ViewPower = context.Powers.Where(p => p.Name == "CoreTitleView").FirstOrDefault<Power>() - }, - new Menu - { - Name = "职称用户管理", - SortIndex = 30, - Remark = "二级菜单", - NavigateUrl = "~/admin/title_user.aspx", - ImageUrl = "~/res/icon/tag_blue.png", - ViewPower = context.Powers.Where(p => p.Name == "CoreTitleUserView").FirstOrDefault<Power>() - }, - new Menu - { - Name = "部门管理", - SortIndex = 40, - Remark = "二级菜单", - NavigateUrl = "~/admin/dept.aspx", - ImageUrl = "~/res/icon/tag_blue.png", - ViewPower = context.Powers.Where(p => p.Name == "CoreDeptView").FirstOrDefault<Power>() - }, - new Menu - { - Name = "部门用户管理", - SortIndex = 50, - Remark = "二级菜单", - NavigateUrl = "~/admin/dept_user.aspx", - ImageUrl = "~/res/icon/tag_blue.png", - ViewPower = context.Powers.Where(p => p.Name == "CoreDeptUserView").FirstOrDefault<Power>() - }, - new Menu - { - Name = "角色管理", - SortIndex = 60, - Remark = "二级菜单", - NavigateUrl = "~/admin/role.aspx", - ImageUrl = "~/res/icon/tag_blue.png", - ViewPower = context.Powers.Where(p => p.Name == "CoreRoleView").FirstOrDefault<Power>() - }, - new Menu - { - Name = "角色用户管理", - SortIndex = 70, - Remark = "二级菜单", - NavigateUrl = "~/admin/role_user.aspx", - ImageUrl = "~/res/icon/tag_blue.png", - ViewPower = context.Powers.Where(p => p.Name == "CoreRoleUserView").FirstOrDefault<Power>() - }, - new Menu - { - Name = "权限管理", - SortIndex = 80, - Remark = "二级菜单", - NavigateUrl = "~/admin/power.aspx", - ImageUrl = "~/res/icon/tag_blue.png", - ViewPower = context.Powers.Where(p => p.Name == "CorePowerView").FirstOrDefault<Power>() - }, - new Menu - { - Name = "角色权限管理", - SortIndex = 90, - Remark = "二级菜单", - NavigateUrl = "~/admin/role_power.aspx", - ImageUrl = "~/res/icon/tag_blue.png", - ViewPower = context.Powers.Where(p => p.Name == "CoreRolePowerView").FirstOrDefault<Power>() - }, - new Menu - { - Name = "菜单管理", - SortIndex = 100, - Remark = "二级菜单", - NavigateUrl = "~/admin/menu.aspx", - ImageUrl = "~/res/icon/tag_blue.png", - ViewPower = context.Powers.Where(p => p.Name == "CoreMenuView").FirstOrDefault<Power>() - }, - new Menu - { - Name = "在线统计", - SortIndex = 110, - Remark = "二级菜单", - NavigateUrl = "~/admin/online.aspx", - ImageUrl = "~/res/icon/tag_blue.png", - ViewPower = context.Powers.Where(p => p.Name == "CoreOnlineView").FirstOrDefault<Power>() - }, - new Menu - { - Name = "系统配置", - SortIndex = 120, - Remark = "二级菜单", - NavigateUrl = "~/admin/config.aspx", - ImageUrl = "~/res/icon/tag_blue.png", - ViewPower = context.Powers.Where(p => p.Name == "CoreConfigView").FirstOrDefault<Power>() - }, - new Menu - { - Name = "用户设置", - SortIndex = 130, - Remark = "二级菜单", - NavigateUrl = "~/admin/profile.aspx", - ImageUrl = "~/res/icon/tag_blue.png" - } - } - } - }; - - return menus; - } - - - private static List<Title> GetTitles() - { - var titles = new List<Title>() - { - new Title() - { - Name = "总经理" - }, - new Title() - { - Name = "部门经理" - }, - new Title() - { - Name = "高级工程师" - }, - new Title() - { - Name = "工程师" - } - }; - - return titles; - } - - private static List<Power> GetPowers() - { - var powers = new List<Power> - { - new Power - { - Name = "CoreUserView", - Title = "浏览用户列表", - GroupName = "CoreUser" - }, - new Power - { - Name = "CoreUserNew", - Title = "新增用户", - GroupName = "CoreUser" - }, - new Power - { - Name = "CoreUserEdit", - Title = "编辑用户", - GroupName = "CoreUser" - }, - new Power - { - Name = "CoreUserDelete", - Title = "删除用户", - GroupName = "CoreUser" - }, - new Power - { - Name = "CoreUserChangePassword", - Title = "修改用户登陆密码", - GroupName = "CoreUser" - }, - new Power - { - Name = "CoreRoleView", - Title = "浏览角色列表", - GroupName = "CoreRole" - }, - new Power - { - Name = "CoreRoleNew", - Title = "新增角色", - GroupName = "CoreRole" - }, - new Power - { - Name = "CoreRoleEdit", - Title = "编辑角色", - GroupName = "CoreRole" - }, - new Power - { - Name = "CoreRoleDelete", - Title = "删除角色", - GroupName = "CoreRole" - }, - new Power - { - Name = "CoreRoleUserView", - Title = "浏览角色用户列表", - GroupName = "CoreRoleUser" - }, - new Power - { - Name = "CoreRoleUserNew", - Title = "向角色添加用户", - GroupName = "CoreRoleUser" - }, - new Power - { - Name = "CoreRoleUserDelete", - Title = "从角色中删除用户", - GroupName = "CoreRoleUser" - }, - new Power - { - Name = "CoreOnlineView", - Title = "浏览在线用户列表", - GroupName = "CoreOnline" - }, - new Power - { - Name = "CoreConfigView", - Title = "浏览全局配置参数", - GroupName = "CoreConfig" - }, - new Power - { - Name = "CoreConfigEdit", - Title = "修改全局配置参数", - GroupName = "CoreConfig" - }, - new Power - { - Name = "CoreMenuView", - Title = "浏览菜单列表", - GroupName = "CoreMenu" - }, - new Power - { - Name = "CoreMenuNew", - Title = "新增菜单", - GroupName = "CoreMenu" - }, - new Power - { - Name = "CoreMenuEdit", - Title = "编辑菜单", - GroupName = "CoreMenu" - }, - new Power - { - Name = "CoreMenuDelete", - Title = "删除菜单", - GroupName = "CoreMenu" - }, - new Power - { - Name = "CoreLogView", - Title = "浏览日志列表", - GroupName = "CoreLog" - }, - new Power - { - Name = "CoreLogDelete", - Title = "删除日志", - GroupName = "CoreLog" - }, - new Power - { - Name = "CoreTitleView", - Title = "浏览职务列表", - GroupName = "CoreTitle" - }, - new Power - { - Name = "CoreTitleNew", - Title = "新增职务", - GroupName = "CoreTitle" - }, - new Power - { - Name = "CoreTitleEdit", - Title = "编辑职务", - GroupName = "CoreTitle" - }, - new Power - { - Name = "CoreTitleDelete", - Title = "删除职务", - GroupName = "CoreTitle" - }, - new Power - { - Name = "CoreTitleUserView", - Title = "浏览职务用户列表", - GroupName = "CoreTitleUser" - }, - new Power - { - Name = "CoreTitleUserNew", - Title = "向职务添加用户", - GroupName = "CoreTitleUser" - }, - new Power - { - Name = "CoreTitleUserDelete", - Title = "从职务中删除用户", - GroupName = "CoreTitleUser" - }, - new Power - { - Name = "CoreDeptView", - Title = "浏览部门列表", - GroupName = "CoreDept" - }, - new Power - { - Name = "CoreDeptNew", - Title = "新增部门", - GroupName = "CoreDept" - }, - new Power - { - Name = "CoreDeptEdit", - Title = "编辑部门", - GroupName = "CoreDept" - }, - new Power - { - Name = "CoreDeptDelete", - Title = "删除部门", - GroupName = "CoreDept" - }, - new Power - { - Name = "CoreDeptUserView", - Title = "浏览部门用户列表", - GroupName = "CoreDeptUser" - }, - new Power - { - Name = "CoreDeptUserNew", - Title = "向部门添加用户", - GroupName = "CoreDeptUser" - }, - new Power - { - Name = "CoreDeptUserDelete", - Title = "从部门中删除用户", - GroupName = "CoreDeptUser" - }, - new Power - { - Name = "CorePowerView", - Title = "浏览权限列表", - GroupName = "CorePower" - }, - new Power - { - Name = "CorePowerNew", - Title = "新增权限", - GroupName = "CorePower" - }, - new Power - { - Name = "CorePowerEdit", - Title = "编辑权限", - GroupName = "CorePower" - }, - new Power - { - Name = "CorePowerDelete", - Title = "删除权限", - GroupName = "CorePower" - }, - new Power - { - Name = "CoreRolePowerView", - Title = "浏览角色权限列表", - GroupName = "CoreRolePower" - }, - new Power - { - Name = "CoreRolePowerEdit", - Title = "编辑角色权限", - GroupName = "CoreRolePower" - } - }; - - return powers; - } - - private static List<Role> GetRoles() - { - var roles = new List<Role>() - { - new Role() - { - Name = "系统管理员", - Remark = "" - }, - new Role() - { - Name = "部门管理员", - Remark = "" - }, - new Role() - { - Name = "项目经理", - Remark = "" - }, - new Role() - { - Name = "开发经理", - Remark = "" - }, - new Role() - { - Name = "开发人员", - Remark = "" - }, - new Role() - { - Name = "后勤人员", - Remark = "" - }, - new Role() - { - Name = "外包人员", - Remark = "" - } - }; - - return roles; - } - - private static List<User> GetUsers() - { - string[] USER_NAMES = { "男", "童光喜", "男", "方原柏", "女", "祝春亚", "男", "涂辉", "男", "舒兆国", "男", "熊忠文", "男", "徐吉琳", "男", "方金海", "男", "包卫峰", "女", "靖小燕", "男", "杨习斌", "男", "徐长旺", "男", "聂建雄", "男", "周敦友", "男", "陈友庭", "女", "陆静芳", "男", "袁国柱", "女", "骆新桂", "男", "许治国", "男", "马先加", "男", "赵恢川", "男", "柯常胜", "男", "黄国鹏", "男", "柯尊北", "男", "刘海云", "男", "罗清波", "男", "张业权", "女", "丁溯鋆", "男", "吴俊", "男", "郑江", "男", "李亚华", "男", "石光富", "男", "谭志洪", "男", "胡中生", "男", "董龙剑", "男", "陈红", "男", "汪海平", "男", "彭道洲", "女", "尹莉君", "男", "占耀玲", "男", "付杰", "男", "王红艳", "男", "邝兴", "男", "饶玮", "男", "王方胜", "男", "陈劲松", "男", "邓庆华", "男", "王石林", "男", "胡俊明", "男", "索相龙", "男", "陈海军", "男", "吴文涛", "女", "熊望梅", "女", "段丽华", "女", "胡莎莎", "男", "徐友安", "男", "肖诗涛", "男", "王闯", "男", "余兴龙", "男", "芦荫杰", "男", "丁金富", "男", "谭军令", "女", "鄢旭燕", "男", "田坤", "男", "夏德胜", "男", "喻显发", "男", "马兴宝", "男", "孙学涛", "男", "陶云成", "男", "马远健", "男", "田华", "男", "聂子森", "男", "郑永军", "男", "余昌平", "男", "陶俊华", "男", "李小林", "男", "李荣宝", "男", "梅盈凯", "男", "张元群", "男", "郝新华", "男", "刘红涛", "男", "向志强", "男", "伍小峰", "男", "胡勇民", "男", "黄定祥", "女", "高红香", "男", "刘军", "男", "叶松", "男", "易俊林", "男", "张威", "男", "刘卫华", "男", "李浩", "男", "李寿庚", "男", "涂洋", "男", "曹晶", "男", "陈辉", "女", "彭博", "男", "严雪冰", "男", "刘青", "女", "印媛", "男", "吴道雄", "男", "邓旻", "男", "陈骏", "男", "崔波", "男", "韩静颐", "男", "严安勇", "男", "刘攀", "女", "刘艳", "女", "孙昕", "女", "郑新", "女", "徐睿", "女", "李月杰", "男", "吕焱鑫", "女", "刘沈", "男", "朱绍军", "女", "马茜", "女", "唐蕾", "女", "刘姣", "女", "于芳", "男", "吴健", "女", "张丹梅", "女", "王燕", "女", "贾兆梅", "男", "程柏漠", "男", "程辉", "女", "任明慧", "女", "焦莹", "女", "马淑娟", "男", "徐涛", "男", "孙庆国", "男", "刘胜", "女", "傅广凤", "男", "袁弘", "男", "高令旭", "男", "栾树权", "女", "申霞", "女", "韩文萍", "女", "隋艳", "男", "邢海洲", "女", "王宁", "女", "陈晶", "女", "吕翠", "女", "刘少敏", "女", "刘少君", "男", "孔鹏", "女", "张冰", "女", "王芳", "男", "万世忠", "女", "徐凡", "女", "张玉梅", "女", "何莉", "女", "时会云", "女", "王玉杰", "女", "谭素英", "女", "李艳红", "女", "刘素莉", "男", "王旭海", "女", "安丽梅", "女", "姚露", "女", "贾颖", "女", "曹微", "男", "黄经华", "女", "陈玉华", "女", "姜媛", "女", "魏立平", "女", "张萍", "男", "来辉", "女", "陈秀玫", "男", "石岩", "男", "王洪捍", "男", "张树军", "女", "李亚琴", "女", "王凤", "女", "王珊华", "女", "杨丹丹", "女", "教黎明", "女", "修晶", "女", "丁晓霞", "女", "张丽", "女", "郭素兰", "女", "徐艳丽", "女", "任子英", "女", "胡雁", "女", "彭洪亮", "女", "高玉珍", "女", "王玉姝", "男", "郑伟", "女", "姜春玲", "女", "张伟", "女", "王颖", "女", "金萍", "男", "孙望", "男", "闫宝东", "男", "周相永", "女", "杨美娜", "女", "欧立新", "女", "刘宝霞", "女", "刘艳杰", "女", "宋艳平", "男", "李克", "女", "梁翠", "女", "宗宏伟", "女", "刘国伟", "女", "敖志敏", "女", "尹玲" }; - string[] EMAIL_NAMES = { "qq.com", "gmail.com", "163.com", "126.com", "outlook.com", "foxmail.com" }; - - var users = new List<User>(); - var rdm = new Random(); - - for (int i = 0, count = USER_NAMES.Length; i < count; i += 2) - { - string gender = USER_NAMES[i]; - string chineseName = USER_NAMES[i + 1]; - string userName = "user" + i.ToString(); - - users.Add(new User - { - Name = userName, - Gender = gender, - Password = PasswordUtil.CreateDbPassword(userName), - ChineseName = chineseName, - Email = userName + "@" + EMAIL_NAMES[rdm.Next(0, EMAIL_NAMES.Length)], - Enabled = true, - CreateTime = DateTime.Now - }); - } - - // 添加超级管理员 - users.Add(new User - { - Name = "admin", - Gender = "男", - Password = PasswordUtil.CreateDbPassword("admin"), - ChineseName = "超级管理员", - Email = "admin@examples.com", - Enabled = true, - CreateTime = DateTime.Now - }); - - return users; - } - - - private static List<Dept> GetDepts() - { - var depts = new List<Dept> { - new Dept - { - Name = "研发部", - SortIndex = 1, - Remark = "顶级部门", - Children = new List<Dept> { - new Dept - { - Name = "开发部", - SortIndex = 1, - Remark = "二级部门" - }, - new Dept - { - Name = "测试部", - SortIndex = 2, - Remark = "二级部门" - } - } - }, - new Dept - { - Name = "销售部", - SortIndex = 2, - Remark = "顶级部门", - Children = new List<Dept> { - new Dept - { - Name = "直销部", - SortIndex = 1, - Remark = "二级部门" - }, - new Dept - { - Name = "渠道部", - SortIndex = 2, - Remark = "二级部门" - } - } - }, - new Dept - { - Name = "客服部", - SortIndex = 3, - Remark = "顶级部门", - Children = new List<Dept> { - new Dept - { - Name = "实施部", - SortIndex = 1, - Remark = "二级部门" - }, - new Dept - { - Name = "售后服务部", - SortIndex = 2, - Remark = "二级部门" - }, - new Dept - { - Name = "大客户服务部", - SortIndex = 3, - Remark = "二级部门" - } - } - }, - new Dept - { - Name = "财务部", - SortIndex = 4, - Remark = "顶级部门" - }, - new Dept - { - Name = "行政部", - SortIndex = 5, - Remark = "顶级部门", - Children = new List<Dept> { - new Dept - { - Name = "人事部", - SortIndex = 1, - Remark = "二级部门" - }, - new Dept - { - Name = "后勤部", - SortIndex = 2, - Remark = "二级部门" - }, - new Dept - { - Name = "运输部", - SortIndex = 3, - Remark = "二级部门", - Children = new List<Dept>{ - new Dept{ - Name = "省内运输部", - SortIndex = 1, - Remark = "三级部门", - }, - new Dept{ - Name = "国内运输部", - SortIndex = 2, - Remark = "三级部门", - }, - new Dept{ - Name = "国际运输部", - SortIndex = 3, - Remark = "三级部门", - } - } - } - } - } - }; - - return depts; - } - - private static List<Config> GetConfigs() - { - var configs = new List<Config> { - new Config - { - ConfigKey = "Title", - ConfigValue = "AppBox - 通用权限管理框架", - Remark = "网站的标题" - }, - new Config - { - ConfigKey = "PageSize", - ConfigValue = "20", - Remark = "表格每页显示的个数" - }, - new Config - { - ConfigKey = "MenuType", - ConfigValue = "tree", - Remark = "左侧菜单样式" - }, - new Config - { - ConfigKey = "Theme", - ConfigValue = "Neptune", - Remark = "网站主题" - }, - new Config - { - ConfigKey = "HelpList", - ConfigValue = "[{\"Text\":\"万年历\",\"Icon\":\"Calendar\",\"ID\":\"wannianli\",\"URL\":\"~/admin/help/wannianli.htm\"},{\"Text\":\"科学计算器\",\"Icon\":\"Calculator\",\"ID\":\"jisuanqi\",\"URL\":\"~/admin/help/jisuanqi.htm\"},{\"Text\":\"系统帮助\",\"Icon\":\"Help\",\"ID\":\"help\",\"URL\":\"~/admin/help/help.htm\"}]", - Remark = "帮助下拉列表的JSON字符串" - } - }; - - return configs; - } - - } -} \ No newline at end of file diff --git a/CK.SCP.Models/AppBoxEntity/Config.cs b/CK.SCP.Models/AppBoxEntity/Config.cs deleted file mode 100644 index 4defeaa..0000000 --- a/CK.SCP.Models/AppBoxEntity/Config.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System.ComponentModel.DataAnnotations; - -namespace CK.SCP.Models.AppBoxEntity -{ - public class Config : IKeyID - { - [Key] - public int ID { get; set; } - - [Required, StringLength(50)] - public string ConfigKey { get; set; } - - [Required, StringLength(4000)] - public string ConfigValue { get; set; } - - [StringLength(500)] - public string Remark { get; set; } - } -} \ No newline at end of file diff --git a/CK.SCP.Models/AppBoxEntity/Dept.cs b/CK.SCP.Models/AppBoxEntity/Dept.cs deleted file mode 100644 index 38ec31b..0000000 --- a/CK.SCP.Models/AppBoxEntity/Dept.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace CK.SCP.Models.AppBoxEntity -{ - public class Dept : ICustomTree, IKeyID, ICloneable - { - [Key] - public int ID { get; set; } - - [Required, StringLength(50)] - public string Name { get; set; } - - [Required] - public int SortIndex { get; set; } - - [StringLength(500)] - public string Remark { get; set; } - - - - public virtual Dept Parent { get; set; } - public virtual ICollection<Dept> Children { get; set; } - - - public virtual ICollection<User> Users { get; set; } - - - - /// <summary> - /// 菜单在树形结构中的层级(从0开始) - /// </summary> - [NotMapped] - public int TreeLevel { get; set; } - - /// <summary> - /// 是否可用(默认true),在模拟树的下拉列表中使用 - /// </summary> - [NotMapped] - public bool Enabled { get; set; } - - /// <summary> - /// 是否叶子节点(默认true) - /// </summary> - [NotMapped] - public bool IsTreeLeaf { get; set; } - - - public object Clone() - { - Dept dept = new Dept - { - ID = ID, - Name = Name, - Remark = Remark, - SortIndex = SortIndex, - TreeLevel = TreeLevel, - Enabled = Enabled, - IsTreeLeaf = IsTreeLeaf - }; - return dept; - } - - } -} \ No newline at end of file diff --git a/CK.SCP.Models/AppBoxEntity/ICustomTree.cs b/CK.SCP.Models/AppBoxEntity/ICustomTree.cs deleted file mode 100644 index f210148..0000000 --- a/CK.SCP.Models/AppBoxEntity/ICustomTree.cs +++ /dev/null @@ -1,25 +0,0 @@ -namespace CK.SCP.Models.AppBoxEntity -{ - public interface ICustomTree - { - /// <summary> - /// 名称 - /// </summary> - string Name { get; set; } - - /// <summary> - /// 菜单在树形结构中的层级(从0开始) - /// </summary> - int TreeLevel { get; set; } - - /// <summary> - /// 是否可用(默认true),在模拟树的下拉列表中使用 - /// </summary> - bool Enabled { get; set; } - - /// <summary> - /// 是否叶子节点(默认true) - /// </summary> - bool IsTreeLeaf { get; set; } - } -} \ No newline at end of file diff --git a/CK.SCP.Models/AppBoxEntity/IKeyID.cs b/CK.SCP.Models/AppBoxEntity/IKeyID.cs deleted file mode 100644 index 195ea0d..0000000 --- a/CK.SCP.Models/AppBoxEntity/IKeyID.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace CK.SCP.Models.AppBoxEntity -{ - public interface IKeyID - { - int ID { get; set; } - - } -} \ No newline at end of file diff --git a/CK.SCP.Models/AppBoxEntity/Log.cs b/CK.SCP.Models/AppBoxEntity/Log.cs deleted file mode 100644 index dde1f17..0000000 --- a/CK.SCP.Models/AppBoxEntity/Log.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; - -namespace CK.SCP.Models.AppBoxEntity -{ - public class Log : IKeyID - { - [Key] - public int ID { get; set; } - - [StringLength(20)] - public string Level { get; set; } - - [StringLength(200)] - public string Logger { get; set; } - - [StringLength(4000)] - public string Message { get; set; } - - [StringLength(4000)] - public string Exception { get; set; } - - public DateTime LogTime { get; set; } - - } -} \ No newline at end of file diff --git a/CK.SCP.Models/AppBoxEntity/Menu.cs b/CK.SCP.Models/AppBoxEntity/Menu.cs deleted file mode 100644 index 5be6f46..0000000 --- a/CK.SCP.Models/AppBoxEntity/Menu.cs +++ /dev/null @@ -1,74 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace CK.SCP.Models.AppBoxEntity -{ - public class Menu : ICustomTree, IKeyID, ICloneable - { - [Key] - public int ID { get; set; } - - [Required, StringLength(50)] - public string Name { get; set; } - - [StringLength(200)] - public string ImageUrl { get; set; } - - [StringLength(200)] - public string NavigateUrl { get; set; } - - [StringLength(500)] - public string Remark { get; set; } - - [Required] - public int SortIndex { get; set; } - - - public virtual Menu Parent { get; set; } - public virtual ICollection<Menu> Children { get; set; } - - - - public virtual Power ViewPower {get; set;} - - - - - /// <summary> - /// 菜单在树形结构中的层级(从0开始) - /// </summary> - [NotMapped] - public int TreeLevel { get; set; } - - /// <summary> - /// 是否可用(默认true),在模拟树的下拉列表中使用 - /// </summary> - [NotMapped] - public bool Enabled { get; set; } - - /// <summary> - /// 是否叶子节点(默认true) - /// </summary> - [NotMapped] - public bool IsTreeLeaf { get; set; } - - - public object Clone() - { - Menu menu = new Menu { - ID = ID, - Name = Name, - ImageUrl = ImageUrl, - NavigateUrl = NavigateUrl, - Remark = Remark, - SortIndex = SortIndex, - TreeLevel = TreeLevel, - Enabled = Enabled, - IsTreeLeaf = IsTreeLeaf - }; - return menu; - } - } -} \ No newline at end of file diff --git a/CK.SCP.Models/AppBoxEntity/Online.cs b/CK.SCP.Models/AppBoxEntity/Online.cs deleted file mode 100644 index f2c7a82..0000000 --- a/CK.SCP.Models/AppBoxEntity/Online.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; - -namespace CK.SCP.Models.AppBoxEntity -{ - public class Online : IKeyID - { - [Key] - public int ID { get; set; } - - [StringLength(50)] - public string IPAdddress { get; set; } - - public DateTime LoginTime { get; set; } - - public DateTime? UpdateTime { get; set; } - - - public virtual User User { get; set; } - - - } -} \ No newline at end of file diff --git a/CK.SCP.Models/AppBoxEntity/PasswordUtil.cs b/CK.SCP.Models/AppBoxEntity/PasswordUtil.cs deleted file mode 100644 index 4ccace8..0000000 --- a/CK.SCP.Models/AppBoxEntity/PasswordUtil.cs +++ /dev/null @@ -1,119 +0,0 @@ -using System; -using System.Security.Cryptography; - -namespace CK.SCP.Models.AppBoxEntity -{ - /// <summary> - /// û룬ȽǷһµ - /// </summary> - public class PasswordUtil - { - #region field & constructor - - //private static readonly Log _log = new Log(typeof(PasswordUtil)); - - private const int saltLength = 4; - - public PasswordUtil() { } - - #endregion - - /// <summary> - /// ԱûǷͼܺһ - /// </summary> - /// <param name="dbPassword">ݿеܺ</param> - /// <param name="userPassword">û</param> - /// <returns></returns> - public static bool ComparePasswords(string dbPassword,string userPassword) - { - byte[] dbPwd = Convert.FromBase64String(dbPassword); - - byte[] hashedPwd = HashString(userPassword); - - if(dbPwd.Length ==0 || hashedPwd.Length ==0 || dbPwd.Length !=hashedPwd.Length + saltLength) - { - return false; - } - - byte[] saltValue = new byte[saltLength]; - // int saltOffset = dbPwd.Length - hashedPwd.Length; - int saltOffset = hashedPwd.Length; - for (int i = 0; i < saltLength; i++) - saltValue[i] = dbPwd[saltOffset + i]; - - byte[] saltedPassword = CreateSaltedPassword(saltValue, hashedPwd); - - // compare the values - return CompareByteArray(dbPwd, saltedPassword); - - - } - - /// <summary> - /// ûݿ - /// </summary> - /// <param name="password"></param> - /// <returns></returns> - public static string CreateDbPassword(string userPassword) - { - byte[] unsaltedPassword = HashString(userPassword); - - //Create a salt value - byte[] saltValue = new byte[saltLength]; - RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider(); - rng.GetBytes(saltValue); - - byte[] saltedPassword = CreateSaltedPassword(saltValue, unsaltedPassword); - - return Convert.ToBase64String(saltedPassword); - - } - - #region ˽к - /// <summary> - /// һַϣ - /// </summary> - /// <param name="str"></param> - /// <returns></returns> - private static byte[] HashString(string str) - { - byte[] pwd = System.Text.Encoding.UTF8.GetBytes(str); - - SHA1 sha1 = SHA1.Create(); - byte[] saltedPassword = sha1.ComputeHash(pwd); - return saltedPassword; - } - private static bool CompareByteArray(byte[] array1, byte[] array2) - { - if (array1.Length != array2.Length) - return false; - for (int i = 0; i < array1.Length; i++) - { - if (array1[i] != array2[i]) - return false; - } - return true; - } - // create a salted password given the salt value - private static byte[] CreateSaltedPassword(byte[] saltValue, byte[] unsaltedPassword) - { - // add the salt to the hash - byte[] rawSalted = new byte[unsaltedPassword.Length + saltValue.Length]; - unsaltedPassword.CopyTo(rawSalted,0); - saltValue.CopyTo(rawSalted,unsaltedPassword.Length); - - //Create the salted hash - SHA1 sha1 = SHA1.Create(); - byte[] saltedPassword = sha1.ComputeHash(rawSalted); - - // add the salt value to the salted hash - byte[] dbPassword = new byte[saltedPassword.Length + saltValue.Length]; - saltedPassword.CopyTo(dbPassword,0); - saltValue.CopyTo(dbPassword,saltedPassword.Length); - - return dbPassword; - } - #endregion - - } -} diff --git a/CK.SCP.Models/AppBoxEntity/Power.cs b/CK.SCP.Models/AppBoxEntity/Power.cs deleted file mode 100644 index 76bef50..0000000 --- a/CK.SCP.Models/AppBoxEntity/Power.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; - -namespace CK.SCP.Models.AppBoxEntity -{ - public class Power : IKeyID - { - [Key] - public int ID { get; set; } - - [Required, StringLength(50)] - public string Name { get; set; } - - [StringLength(50)] - public string GroupName { get; set; } - - [StringLength(200)] - public string Title { get; set; } - - [StringLength(500)] - public string Remark { get; set; } - - - public virtual ICollection<Role> Roles { get; set; } - - } -} \ No newline at end of file diff --git a/CK.SCP.Models/AppBoxEntity/Role.cs b/CK.SCP.Models/AppBoxEntity/Role.cs deleted file mode 100644 index e2b46e7..0000000 --- a/CK.SCP.Models/AppBoxEntity/Role.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; - -namespace CK.SCP.Models.AppBoxEntity -{ - public class Role : IKeyID - { - [Key] - public int ID { get; set; } - - [Required, StringLength(50)] - public string Name { get; set; } - - [StringLength(500)] - public string Remark { get; set; } - - - public virtual ICollection<User> Users { get; set; } - - - public virtual ICollection<Power> Powers { get; set; } - - } -} \ No newline at end of file diff --git a/CK.SCP.Models/AppBoxEntity/Title.cs b/CK.SCP.Models/AppBoxEntity/Title.cs deleted file mode 100644 index 8927aed..0000000 --- a/CK.SCP.Models/AppBoxEntity/Title.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; - -namespace CK.SCP.Models.AppBoxEntity -{ - public class Title : IKeyID - { - [Key] - public int ID { get; set; } - - [Required, StringLength(50)] - public string Name { get; set; } - - [StringLength(500)] - public string Remark { get; set; } - - - public virtual ICollection<User> Users { get; set; } - - - - } -} \ No newline at end of file diff --git a/CK.SCP.Models/AppBoxEntity/User.cs b/CK.SCP.Models/AppBoxEntity/User.cs deleted file mode 100644 index 85a0e71..0000000 --- a/CK.SCP.Models/AppBoxEntity/User.cs +++ /dev/null @@ -1,85 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace CK.SCP.Models.AppBoxEntity -{ - public class User : IKeyID - { - [Key] - public int ID { get; set; } - - [Required, StringLength(50)] - public string Name { get; set; } - - [Required, StringLength(100)] - public string Email { get; set; } - - [Required, StringLength(50)] - public string Password { get; set; } - - [Required] - public bool Enabled { get; set; } - - [StringLength(10)] - public string Gender { get; set; } - - [StringLength(100)] - public string ChineseName { get; set; } - - [StringLength(100)] - public string EnglishName { get; set; } - - [StringLength(200)] - public string Photo { get; set; } - - [StringLength(50)] - public string QQ { get; set; } - - [StringLength(100)] - public string CompanyEmail { get; set; } - - [StringLength(50)] - public string OfficePhone { get; set; } - - [StringLength(50)] - public string OfficePhoneExt { get; set; } - - [StringLength(50)] - public string HomePhone { get; set; } - - [StringLength(50)] - public string CellPhone { get; set; } - - [StringLength(500)] - public string Address { get; set; } - - [StringLength(500)] - public string Remark { get; set; } - - [StringLength(500)] - public string SupplierCode { get; set; } - - [NotMapped] - [StringLength(500)] - public string VendName { get; set; } - - [StringLength(50)] - public string IdentityCard { get; set; } - - - public DateTime? Birthday { get; set; } - public DateTime? TakeOfficeTime { get; set; } - public DateTime? LastLoginTime { get; set; } - public DateTime? CreateTime { get; set; } - - - - public virtual ICollection<Role> Roles { get; set; } - public virtual ICollection<Title> Titles { get; set; } - - public virtual Dept Dept { get; set; } - - } -} \ No newline at end of file diff --git a/CK.SCP.Models/CK.SCP.Models.csproj b/CK.SCP.Models/CK.SCP.Models.csproj deleted file mode 100644 index ed050a2..0000000 --- a/CK.SCP.Models/CK.SCP.Models.csproj +++ /dev/null @@ -1,252 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> - <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProjectGuid>{DD7C0DEF-71E7-443F-B0B7-DB2F5B12A506}</ProjectGuid> - <OutputType>Library</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> - <RootNamespace>CK.SCP.Models</RootNamespace> - <AssemblyName>CK.SCP.Models</AssemblyName> - <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion> - <FileAlignment>512</FileAlignment> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>..\DLL\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>bin\Release\</OutputPath> - <DefineConstants>TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <ItemGroup> - <Reference Include="EntityFramework"> - <HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll</HintPath> - </Reference> - <Reference Include="EntityFramework.SqlServer"> - <HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll</HintPath> - </Reference> - <Reference Include="Newtonsoft.Json"> - <HintPath>..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath> - </Reference> - <Reference Include="System" /> - <Reference Include="System.ComponentModel.DataAnnotations" /> - <Reference Include="System.Core" /> - <Reference Include="System.Xml.Linq" /> - <Reference Include="System.Data.DataSetExtensions" /> - <Reference Include="Microsoft.CSharp" /> - <Reference Include="System.Data" /> - <Reference Include="System.Net.Http" /> - <Reference Include="System.Xml" /> - </ItemGroup> - <ItemGroup> - <Compile Include="AppBoxEntity\AppBoxContext.cs" /> - <Compile Include="AppBoxEntity\AppBoxDatabaseInitializer.cs" /> - <Compile Include="AppBoxEntity\Config.cs" /> - <Compile Include="AppBoxEntity\Dept.cs" /> - <Compile Include="AppBoxEntity\ICustomTree.cs" /> - <Compile Include="AppBoxEntity\IKeyID.cs" /> - <Compile Include="AppBoxEntity\Log.cs" /> - <Compile Include="AppBoxEntity\Menu.cs" /> - <Compile Include="AppBoxEntity\Online.cs" /> - <Compile Include="AppBoxEntity\PasswordUtil.cs" /> - <Compile Include="AppBoxEntity\Power.cs" /> - <Compile Include="AppBoxEntity\Role.cs" /> - <Compile Include="AppBoxEntity\Title.cs" /> - <Compile Include="AppBoxEntity\User.cs" /> - <Compile Include="DbSetting.cs" /> - <Compile Include="EntitiesFactory.cs" /> - <Compile Include="EntitiesHelper.cs" /> - <Compile Include="Enums\BillType.cs" /> - <Compile Include="Enums\CollectionStepFinish.cs" /> - <Compile Include="Enums\ControlType.cs" /> - <Compile Include="Enums\DataBaseType.cs" /> - <Compile Include="Enums\DataState.cs" /> - <Compile Include="Enums\EquipmentState.cs" /> - <Compile Include="Enums\ErpInterfaceType.cs" /> - <Compile Include="Enums\GroupType.cs" /> - <Compile Include="Enums\InspectionType.cs" /> - <Compile Include="Enums\InspectType.cs" /> - <Compile Include="Enums\InventoryState.cs" /> - <Compile Include="Enums\InvoiceState.cs" /> - <Compile Include="Enums\LocType.cs" /> - <Compile Include="Enums\LoginState.cs" /> - <Compile Include="Enums\LogType.cs" /> - <Compile Include="Enums\ManageType.cs" /> - <Compile Include="Enums\ManufactureProcedureType.cs" /> - <Compile Include="Enums\NotifyType.cs" /> - <Compile Include="Enums\OperateType.cs" /> - <Compile Include="Enums\PartKind.cs" /> - <Compile Include="Enums\PartState.cs" /> - <Compile Include="Enums\PartType.cs" /> - <Compile Include="Enums\PlanDayState.cs" /> - <Compile Include="Enums\PlanState.cs" /> - <Compile Include="Enums\PortalType.cs" /> - <Compile Include="Enums\PrintType.cs" /> - <Compile Include="Enums\Project.cs" /> - <Compile Include="Enums\ProjectName.cs" /> - <Compile Include="Enums\ReceiveBillType.cs" /> - <Compile Include="Enums\ReceiveState.cs" /> - <Compile Include="Enums\ResultCode.cs" /> - <Compile Include="Enums\ServiceType.cs" /> - <Compile Include="Enums\ShipState.cs" /> - <Compile Include="Enums\StockState.cs" /> - <Compile Include="Enums\StockWhereType.cs" /> - <Compile Include="Enums\StopLineType.cs" /> - <Compile Include="Enums\StoreArea.cs" /> - <Compile Include="Enums\SubBillType.cs" /> - <Compile Include="Enums\UniApiState.cs" /> - <Compile Include="Enums\UniApiType.cs" /> - <Compile Include="Enums\VinState.cs" /> - <Compile Include="Enums\WhseType.cs" /> - <Compile Include="Enums\WorkLineType.cs" /> - <Compile Include="GlobalConfig.cs" /> - <Compile Include="Properties\AssemblyInfo.cs" /> - <Compile Include="ScpCache.cs" /> - <Compile Include="ScpEntities.cs" /> - <Compile Include="ScpEntity\ERP_ORDER.cs" /> - <Compile Include="ScpEntity\ERP_ORDER_DETAIL.cs" /> - <Compile Include="ScpEntity\QadOrder.cs" /> - <Compile Include="ScpEntity\TA_BillNoType.cs" /> - <Compile Include="ScpEntity\TA_BILLTYPE.cs" /> - <Compile Include="ScpEntity\TA_CONFIG.cs" /> - <Compile Include="ScpEntity\TA_FACTORY.cs" /> - <Compile Include="ScpEntity\TA_Info.cs" /> - <Compile Include="ScpEntity\TA_LANGUAGE.cs" /> - <Compile Include="ScpEntity\TA_PART.cs" /> - <Compile Include="ScpEntity\TA_Part_User.cs" /> - <Compile Include="ScpEntity\TA_VENDER.cs" /> - <Compile Include="ScpEntity\TA_VEND_PART.cs" /> - <Compile Include="ScpEntity\TA_VEND_USER.cs" /> - <Compile Include="ScpEntity\TB_ASK.cs" /> - <Compile Include="ScpEntity\TB_ASK_DETAIL.cs" /> - <Compile Include="ScpEntity\TB_ASN.cs" /> - <Compile Include="ScpEntity\TB_ASN_DETAIL.cs" /> - <Compile Include="ScpEntity\TB_INVOICE.cs" /> - <Compile Include="ScpEntity\TB_INVOICE_DETAIL.cs" /> - <Compile Include="ScpEntity\TB_PLAN.cs" /> - <Compile Include="ScpEntity\TB_PlanMonth.cs" /> - <Compile Include="ScpEntity\TB_PLAN_DETAIL.cs" /> - <Compile Include="ScpEntity\TB_PO.cs" /> - <Compile Include="ScpEntity\TB_PO_DETAIL.cs" /> - <Compile Include="ScpEntity\TB_PublicData.cs" /> - <Compile Include="ScpEntity\TB_QadOrder.cs" /> - <Compile Include="ScpEntity\TB_QadOrderDetail.cs" /> - <Compile Include="ScpEntity\TB_RECEIVE.cs" /> - <Compile Include="ScpEntity\TB_RECEIVE_DETAIL.cs" /> - <Compile Include="ScpEntity\TB_REJECT.cs" /> - <Compile Include="ScpEntity\TB_REJECT_DETAIL.cs" /> - <Compile Include="ScpEntity\TB_RETURN.cs" /> - <Compile Include="ScpEntity\TB_RETURN_DETAIL.cs" /> - <Compile Include="ScpEntity\TF_ASN.cs" /> - <Compile Include="ScpEntity\TF_ASN_DETAIL.cs" /> - <Compile Include="ScpEntity\TF_PO.cs" /> - <Compile Include="ScpEntity\TF_PO_DETAIL.cs" /> - <Compile Include="ScpEntity\TL_BASEDATA.cs" /> - <Compile Include="ScpEntity\TL_BILL.cs" /> - <Compile Include="ScpEntity\TL_OPER.cs" /> - <Compile Include="ScpEntity\TL_USER.cs" /> - <Compile Include="ScpEntity\TS_BARCODE.cs" /> - <Compile Include="ScpEntity\TS_INFO.cs" /> - <Compile Include="ScpEntity\TS_STOCK.cs" /> - <Compile Include="ScpEntity\TS_UNI_API.cs" /> - <Compile Include="ScpEntity\TS_UNI_API_HIS.cs" /> - <Compile Include="ScpEntity\TT_CURRENCY.cs" /> - <Compile Include="ScpEntity\TT_PROJECT.cs" /> - <Compile Include="ScpEntity\TT_UNIT.cs" /> - <Compile Include="ScpEntity\V_BillInvoice.cs" /> - <Compile Include="ScpEntity\V_BillInvoiceDetail.cs" /> - <Compile Include="ScpEntity\V_BillShip.cs" /> - <Compile Include="ScpEntity\V_BillShipDetail.cs" /> - <Compile Include="ScpEntity\V_Info.cs" /> - <Compile Include="ScpEntity\V_PlanMonth.cs" /> - <Compile Include="ScpEntity\V_POAll.cs" /> - <Compile Include="ScpEntity\V_POAllDetail.cs" /> - <Compile Include="ScpEntity\V_POReport.cs" /> - <Compile Include="ScpEntity\V_QadOrder.cs" /> - <Compile Include="ScpEntity\V_Receive.cs" /> - <Compile Include="ScpEntity\V_ReceiveDetail.cs" /> - <Compile Include="ScpEntity\V_ReportReceive.cs" /> - <Compile Include="ScpEntity\V_Stock.cs" /> - <Compile Include="SCPException.cs" /> - <Compile Include="UniApiEntity\IControlTable.cs" /> - <Compile Include="UniApiEntity\IDataTable.cs" /> - <Compile Include="UniApiEntity\ITable.cs" /> - <Compile Include="UniApiEntity\QadTableName.cs" /> - <Compile Include="UniApiEntity\UniApiEntities.cs" /> - <Compile Include="UniApiEntity\UniInterfaceExtention.cs" /> - <Compile Include="UniApiEntity\xxbom_code_mstr.cs" /> - <Compile Include="UniApiEntity\xxbom_ctrl.cs" /> - <Compile Include="UniApiEntity\xxbom_ps_mstr.cs" /> - <Compile Include="UniApiEntity\xxbom_pt_mstr.cs" /> - <Compile Include="UniApiEntity\xxbom_ro_mstr.cs" /> - <Compile Include="UniApiEntity\xxmes_ctrl.cs" /> - <Compile Include="UniApiEntity\xxqad_cm_mstr.cs" /> - <Compile Include="UniApiEntity\xxqad_ctrl.cs" /> - <Compile Include="UniApiEntity\xxqad_ld_det.cs" /> - <Compile Include="UniApiEntity\xxqad_line_mstr.cs" /> - <Compile Include="UniApiEntity\xxqad_loc_det.cs" /> - <Compile Include="UniApiEntity\xxqad_pod_det.cs" /> - <Compile Include="UniApiEntity\xxqad_pprice_det.cs" /> - <Compile Include="UniApiEntity\xxqad_prh_det.cs" /> - <Compile Include="UniApiEntity\xxqad_ps_mstr.cs" /> - <Compile Include="UniApiEntity\xxqad_pt_mstr.cs" /> - <Compile Include="UniApiEntity\xxqad_repsch_det.cs" /> - <Compile Include="UniApiEntity\xxqad_ro_mstr.cs" /> - <Compile Include="UniApiEntity\xxqad_sche_mstr.cs" /> - <Compile Include="UniApiEntity\xxqad_sct_det.cs" /> - <Compile Include="UniApiEntity\xxqad_sod_det.cs" /> - <Compile Include="UniApiEntity\xxqad_sprice_det.cs" /> - <Compile Include="UniApiEntity\xxqad_vd_mstr.cs" /> - <Compile Include="UniApiEntity\xxqad_vp_mstr.cs" /> - <Compile Include="UniApiEntity\xxscm_ctrl.cs" /> - <Compile Include="UniApiEntity\xxscm_inv_det.cs" /> - <Compile Include="UniApiEntity\xxscm_pod_det.cs" /> - <Compile Include="UniApiEntity\xxscm_tx_det.cs" /> - <Compile Include="UniApiEntity\xxscm_tx_mstr.cs" /> - <Compile Include="UniApiEntity\xxwms_bk_mstr.cs" /> - <Compile Include="UniApiEntity\xxwms_ctrl.cs" /> - <Compile Include="UniApiEntity\xxwms_iss_det.cs" /> - <Compile Include="UniApiEntity\xxwms_ld_det.cs" /> - <Compile Include="UniApiEntity\xxwms_rct_det.cs" /> - <Compile Include="UniApiEntity\xxwms_rc_det.cs" /> - <Compile Include="UniApiEntity\xxwms_rt_det.cs" /> - <Compile Include="UniApiEntity\xxwms_soiss_det.cs" /> - <Compile Include="UniApiEntity\xxwms_tag_det.cs" /> - <Compile Include="UniApiEntity\xxwms_tr_det.cs" /> - <Compile Include="ScpEntity\V_TB_ASK.cs" /> - <Compile Include="ScpEntity\V_TB_ASK_DETAIL.cs" /> - <Compile Include="ScpEntity\V_TB_ASN.cs" /> - <Compile Include="ScpEntity\V_TB_ASN_DETAIL.cs" /> - <Compile Include="ScpEntity\V_TB_PO.cs" /> - <Compile Include="ScpEntity\V_TB_PO_DETAIL.cs" /> - </ItemGroup> - <ItemGroup> - <ProjectReference Include="..\CK.SCP.Utils\CK.SCP.Utils.csproj"> - <Project>{7118ac83-9dc0-41f5-94ea-e6f405ae0448}</Project> - <Name>CK.SCP.Utils</Name> - </ProjectReference> - </ItemGroup> - <ItemGroup> - <None Include="App.config" /> - <None Include="packages.config" /> - </ItemGroup> - <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> - <!-- To modify your build process, add your task inside one of the targets below and uncomment it. - Other similar extension points exist, see Microsoft.Common.targets. - <Target Name="BeforeBuild"> - </Target> - <Target Name="AfterBuild"> - </Target> - --> -</Project> \ No newline at end of file diff --git a/CK.SCP.Models/DbSetting.cs b/CK.SCP.Models/DbSetting.cs deleted file mode 100644 index 7534d6e..0000000 --- a/CK.SCP.Models/DbSetting.cs +++ /dev/null @@ -1,28 +0,0 @@ -using CK.SCP.Models.Enums; - -namespace CK.SCP.Models -{ - public class DbSetting - { - public override string ToString() - { - return EntitiesHelper.GetPropertiesString(this); - } - - public DbSetting() { } - - public DbSetting(DataBaseType type) - { - ݿ = type.ToString(); - } - - public string ݿ { get; set; } = Enums.DataBaseType.SQLServer.ToString(); - - public string ַ { get; set; } = "127.0.0.1"; - public string ˿ { get; set; } = "1433"; - public string ݿ { get; set; } = "DB_NAME"; - public string û { get; set; } = "sa"; - public string { get; set; } = "5E0AFEB85CA001A3371A9F19E7EC4DFF"; - - } -} \ No newline at end of file diff --git a/CK.SCP.Models/EntitiesFactory.cs b/CK.SCP.Models/EntitiesFactory.cs deleted file mode 100644 index 8a99646..0000000 --- a/CK.SCP.Models/EntitiesFactory.cs +++ /dev/null @@ -1,148 +0,0 @@ -using System; -using System.Data.Entity; -using System.Data.Entity.Core; -using System.Data.Entity.Core.EntityClient; -using System.Data.SqlClient; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using CK.SCP.Models.AppBoxEntity; -using CK.SCP.Models.Enums; -using CK.SCP.Models.UniApiEntity; -using CK.SCP.Utils; - -namespace CK.SCP.Models -{ - public static class EntitiesFactory - { - static EntitiesFactory() - { - Database.SetInitializer<ScpEntities>(null); - Database.SetInitializer<UniApiEntities>(null); - } - - public static ScpEntities CreateScpInstance() - { - try - { - // var strConn = setting == null ? GetEfConnectionString("Wms") : GetEfConnectionString(setting); - - var strConn = GetEfConnectionString(GlobalConfig.ScpDatabase); - var db = new ScpEntities(strConn); - return db; - } - catch (SqlException ex) - { - throw new Exception($"ϵͳ޷ӵݿ:{GlobalConfig.ScpDatabase}õķ,ݿ,ûϢǷȷ" + Environment.NewLine + ex); - } - - } - - public static UniApiEntities CreateUniApiInstance() - { - try - { - // var strConn = setting == null ? GetEfConnectionString("UniApi") : GetEfConnectionString(setting); - var strConn = GetEfConnectionString(GlobalConfig.UniApiDatabase); - var db = new UniApiEntities(strConn); - return db; - } - catch (SqlException ex) - { - throw new Exception($"ϵͳ޷ӵݿ:{GlobalConfig.UniApiDatabase}õķ,ݿ,ûϢǷȷ" + Environment.NewLine + ex); - } - } - - public static AppBoxContext CreateAppBoxInstance() - { - try - { - // var strConn = setting == null ? GetEfConnectionString("UniApi") : GetEfConnectionString(setting); - var strConn = GetEfConnectionString(GlobalConfig.AppBoxDatabase); - var db = new AppBoxContext(strConn); - return db; - } - catch (SqlException ex) - { - throw new Exception($"ϵͳ޷ӵݿ:{GlobalConfig.AppBoxDatabase}õķ,ݿ,ûϢǷȷ" + Environment.NewLine + ex); - } - } - - public static string GetEfConnectionString(DbSetting dbSetting) - { - var sbConn = new StringBuilder(); - - if (string.IsNullOrEmpty(dbSetting.)) - { - throw new Exception("ļ"); - } - switch (dbSetting.ݿ) - { - case "SQLServer": - sbConn.Append($"Data source ={dbSetting.ַ}"); - sbConn.Append(dbSetting.˿ == "0" ? ";" : $",{dbSetting.˿};"); - sbConn.Append($"Initial catalog = {dbSetting.ݿ};"); - sbConn.Append($"User id = {dbSetting.û};"); - sbConn.Append($"Password = {EncryptHelper.Decrypt(dbSetting.)};"); - sbConn.Append("MultipleActiveResultSets = True;"); - sbConn.Append("persist security info = True;"); - sbConn.Append("App = EntityFramework;"); - break; - case "MySql": - sbConn.Append($"server ={dbSetting.ַ};"); - sbConn.Append($"port ={dbSetting.˿};"); - sbConn.Append($"database = {dbSetting.ݿ};"); - sbConn.Append($"user id = {dbSetting.û};"); - sbConn.Append($"password = {EncryptHelper.Decrypt(dbSetting.)};"); - sbConn.Append("persistsecurityinfo =True;"); - break; - } - // LogHelper.Write(sbConn.ToString()); - return sbConn.ToString(); - } - - public static void SaveDb(DbContext db) - { - try - { - db.SaveChanges(); - } - catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//ʵ֤쳣 - { - var sb = new StringBuilder(); - - foreach (var error in dbEx.EntityValidationErrors.ToList()) - { - - error.ValidationErrors.ToList().ForEach(i => - { - sb.AppendFormat("{0}ֶΣ{1}Ϣ{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); - }); - } - throw new ScpException(ResultCode.DbEntityValidationException, sb.ToString(), "ֶ֤ʧ" + sb.ToString()); - } - catch (OptimisticConcurrencyException ex)//ͻ쳣 - { - Console.WriteLine(ex.ToString()); - throw new ScpException(ResultCode.Exception, "9999", ex.ToString()); - } - catch (ScpException ex) - { - Console.WriteLine(ex.ToString()); - - if (ex.InnerException != null && ex.InnerException.GetType() == typeof(UpdateException)) - { - var inner = (UpdateException)ex.InnerException; - - //Console.WriteLine(inner?.StateEntries[0].EntitySet.Name); - throw new ScpException(ResultCode.Exception, "0000", ex.ToString()); - } - else - { - if (ex.InnerException != null) throw ex.InnerException; - } - } - } - - } -} \ No newline at end of file diff --git a/CK.SCP.Models/EntitiesHelper.cs b/CK.SCP.Models/EntitiesHelper.cs deleted file mode 100644 index a0269da..0000000 --- a/CK.SCP.Models/EntitiesHelper.cs +++ /dev/null @@ -1,162 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Data.Entity; -using System.Linq; -using System.Linq.Expressions; -using System.Reflection; -using System.Text; - -namespace CK.SCP.Models -{ - public static class EntitiesHelper - { - - - public static string GetPropertiesString<T>(T t,bool withName = true) - { - var peroperties = t.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance); - var sb = new StringBuilder(); - foreach (var property in peroperties) - { - if (withName) - sb.Append($"{property.Name}:"); - sb.Append($"{property.GetValue(t)},"); - } - return sb.ToString(); - } - - - - public static List<T> GetData<T, TKey>(DbContext db, Expression<Func<T, T>> select, - Expression<Func<T, bool>> where, Expression<Func<T, TKey>> order) - where T : class - { - var list = db.Set<T>() - .Where(@where) - .OrderBy(order) - .Select(@select).ToList(); - return list; - } - - - public static List<dynamic> GetData<T, TKey>(DbContext db, Expression<Func<T, dynamic>> select, - Expression<Func<T, bool>> where, Expression<Func<T, TKey>> order, out int count) - where T : class - { - count = db.Set<T>().Where(@where).Count(); - var list = db.Set<T>() - .Where(@where) - .OrderBy(order) - .Select(@select).ToList(); - return list; - - } - - public static List<dynamic> GetPagedDataAsc<T, TKey>(DbContext db, Expression<Func<T, dynamic>> select, - Expression<Func<T, bool>> where, Expression<Func<T, TKey>> order, int pageIndex, int pageSize, out int total) - where T : class - { - total = db.Set<T>().Where(@where).Count(); - var list = db.Set<T>() - .Where(@where) - .OrderBy(order) - .Select(@select) - .Skip((pageIndex - 1) * pageSize) - .Take(pageSize).ToList(); - return list; - - } - - public static List<T> GetPagedDataAsc<T, TKey>(DbContext db, Expression<Func<T, T>> select, - Expression<Func<T, bool>> where, Expression<Func<T, TKey>> order, int pageIndex, int pageSize, out int total) - where T : class - { - total = db.Set<T>().Where(@where.Compile()).AsQueryable().Count(); - var list = db.Set<T>() - .Where(@where.Compile()).AsQueryable() - .OrderBy(order) - .Select(@select) - .Skip((pageIndex - 1) * pageSize) - .Take(pageSize).ToList(); - return list; - - } - - public static List<T> GetPagedDataAsc<T, TKey>(List<T> sourceList, Expression<Func<T, T>> select, - Expression<Func<T, bool>> where, Expression<Func<T, TKey>> order, int pageIndex, int pageSize, out int total) - where T : class - { - List<T> list = null; - total = 0; - try - { - total = sourceList.Where(where.Compile()).AsQueryable().Count(); - - - } - catch (Exception e) - { - Console.WriteLine(e); - } - try - { - list = sourceList.Where(@where.Compile()).AsQueryable() - .OrderBy(order) - .Select(@select) - .Skip((pageIndex - 1) * pageSize) - .Take(pageSize).ToList(); - } - catch (Exception e) - { - Console.WriteLine(e); - } - - return list; - - } - - - public static List<dynamic> GetPagedDataDesc<T, TKey>(DbContext db, Expression<Func<T, dynamic>> select, - Expression<Func<T, bool>> where, Expression<Func<T, TKey>> order, int pageIndex, int pageSize, out int total) - where T : class - { - total = db.Set<T>().Where(@where).Count(); - var list = db.Set<T>() - .Where(@where) - .OrderByDescending(order) - .Select(@select) - .Skip((pageIndex - 1) * pageSize) - .Take(pageSize).ToList(); - return list; - } - - public static List<T> GetPagedDataDesc<T, TKey>(DbContext db, Expression<Func<T, T>> select, - Expression<Func<T, bool>> where, Expression<Func<T, TKey>> order, int pageIndex, int pageSize, out int total) - where T : class - { - total = db.Set<T>().Where(@where).Count(); - var list = db.Set<T>() - .Where(@where) - .OrderByDescending(order) - .Select(@select) - .Skip((pageIndex - 1) * pageSize) - .Take(pageSize).ToList(); - return list; - } - - public static List<T> GetPagedDataDesc<T, TKey>(List<T> sourceList, Expression<Func<T, T>> select, - Expression<Func<T, bool>> where, Expression<Func<T, TKey>> order, int pageIndex, int pageSize, out int total) - where T : class - { - total = sourceList.Where(@where.Compile()).AsQueryable().Count(); - var list = sourceList - .Where(@where.Compile()).AsQueryable() - .OrderByDescending(order) - .Select(@select) - .Skip((pageIndex - 1) * pageSize) - .Take(pageSize).ToList(); - return list; - - } - } -} \ No newline at end of file diff --git a/CK.SCP.Models/Enums/BillType.cs b/CK.SCP.Models/Enums/BillType.cs deleted file mode 100644 index 41aa8b4..0000000 --- a/CK.SCP.Models/Enums/BillType.cs +++ /dev/null @@ -1,158 +0,0 @@ -using System.ComponentModel; - -namespace CK.SCP.Models.Enums -{ - public enum BillType - { - [Description("原料收货")] - MaterialReceive = 101, - [Description("原料入库")] - MaterialIn = 102, - [Description("原料出库")] - MaterialDeliver = 103, - [Description("生产叫料")] - MaterialAsk = 104, - [Description("原料退货")] - MatertialReturn = 105, - [Description("生产退库")] - MaterialBack = 106, - - - [Description("委外出库")] - OutsourceDeliver = 109, - - // [Description("原料退货")] - // MaterialBack = 105, - // [Description("生产退库")] - // MaterialReturn = 106, - - [Description("成品收货")] - ProductReceive = 201, - [Description("成品入库")] - ProductIn = 202, - [Description("成品发货")] - DeliverPlan = 204, - [Description("客户退货")] - ProductReturn = 205, - [Description("成品顺序发货")] - ProductSortedDeliver = 206, - [Description("成品销售")] - ProductSell = 207, - [Description("成品返修")] - ProductRepair = 208, - - [Description("委外入库")] - OutsourceReceive = 209, - - - [Description("其它入库")] - OtherIn = 300, - [Description("其它出库")] - OtherOut = 301, - [Description("移库")] - StockMove = 302, - [Description("打包")] - StockPack = 303, - [Description("拆包")] - StockUnpack = 304, - [Description("盘点计划")] - InventoryPlan = 305, - [Description("结算比对")] - BalanceCompare = 307, - [Description("盘点库位")] - InventoryLoc = 306, - - [Description("器具初始化")] - EqptRecover = 401, - [Description("器具保养")] - EqptMaintain = 402, - [Description("器具报废")] - EqptScrap = 403, - [Description("码托")] - EqptLoad = 404, - - [Description("JIS收货")] - VinReceive = 501, - [Description("JIS发货")] - VinDeliver = 502, - [Description("JIS销售")] - VinSell = 503, - - [Description("报检")] - Inspect = 601, - [Description("追溯")] - TraceBack = 602, - [Description("备货单")] - PickPlan = 603, - [Description("发料单")] - PickFact = 604, - [Description("生产计划")] - ProducePlan = 605, - [Description("生产订单")] - ManuOrder = 607, - [Description("不合格品单")] - UnqualifiedProd = 608, - [Description("设备点检模板")] - CheckModeEquipment = 609, - [Description("设备点检单")] - CheckBillEquipment = 610, - [Description("产品点检模板")] - CheckModeProduct = 611, - [Description("产品点检单")] - CheckBillProduct = 612, - [Description("首检模板")] - SpotInspectFirstMode = 613, - [Description("首检单")] - SpotInspectionFirst = 615, - [Description("巡检模板")] - SpotInspectMedMode = 616, - [Description("巡检单")] - SpotInspectionMed = 617, - [Description("末检模板")] - SpotInspectLastMode = 618, - [Description("末检单")] - SpotInspectionLast = 619, - [Description("停线单")] - LineStopBill = 620, - [Description("产线识别码")] - WorkLineDoc = 621, - [Description("工位识别码")] - WorkStationDoc = 622, - [Description("路由识别码")] - RouteDoc = 623, - [Description("工位拆解识别码")] - RouteBOMDoc = 624, - [Description("参数识别码")] - RoutePDoc = 625, - [Description("工位部件识别码")] - MachinePart = 626, - [Description("停线发通知编号")] - LineStopNoticeBill = 627, - [Description("停线预计处理编号")] - LineStopPrepareBill = 628, - [Description("措施编号")] - LineStopMeasureBill = 629, - [Description("点检表编号")] - CheckCode = 630, - - ReHandleVin = 701, - [Description("采购订单")] - PuchaseOrder = 702, - [Description("发货单")] - AsnOrder = 703, - [Description("销售订单")] - SaleOrder = 704, - - - [Description("确认订单")] - PO = 704, - [Description("收货")] - Receive = 704, - [Description("条码")] - BarCode = 704, - [Description("发票")] - Invoice = 704, - - - } -} \ No newline at end of file diff --git a/CK.SCP.Models/Enums/CollectionStepFinish.cs b/CK.SCP.Models/Enums/CollectionStepFinish.cs deleted file mode 100644 index 998377c..0000000 --- a/CK.SCP.Models/Enums/CollectionStepFinish.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System.ComponentModel; - -namespace CK.SCP.Models.Enums -{ - public enum CollectionStepFinish - { - [Description("零件扫条码")] ScanPartBarCode = 1, - [Description("机器复位信号")] ScanMachineReset = 2, - [Description("专用计数设备")] counters = 3 - } -} \ No newline at end of file diff --git a/CK.SCP.Models/Enums/ControlType.cs b/CK.SCP.Models/Enums/ControlType.cs deleted file mode 100644 index d84d0a5..0000000 --- a/CK.SCP.Models/Enums/ControlType.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System.ComponentModel; - -namespace CK.SCP.Models.Enums -{ - public enum ControlType - { - [Description("ǩ")] - Tab = 0, - [Description("Ⱥ")] - Grp = 1, - [Description("")] - Ctn = 2, - [Description("˵")] - Itm = 3, - } -} \ No newline at end of file diff --git a/CK.SCP.Models/Enums/DataBaseType.cs b/CK.SCP.Models/Enums/DataBaseType.cs deleted file mode 100644 index 1a1097c..0000000 --- a/CK.SCP.Models/Enums/DataBaseType.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace CK.SCP.Models.Enums -{ - public enum DataBaseType - { - SQLServer, - MySql, - Oracle, - PostgreSQL, - } -} \ No newline at end of file diff --git a/CK.SCP.Models/Enums/DataState.cs b/CK.SCP.Models/Enums/DataState.cs deleted file mode 100644 index f3f2710..0000000 --- a/CK.SCP.Models/Enums/DataState.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System.ComponentModel; - -namespace CK.SCP.Models.Enums -{ - public enum DataState - { - [Description("无效")] - Disabled = 0, - [Description("有效")] - Enabled = 1, - } - - public enum FormState - { - [Description("开放")] - 开放 = 1, - [Description("关闭")] - 关闭 = 0, - - } - - public enum BillState - { - Cancel = -1, - New = 0, - Process = 1, - Finish = 2, - } -} \ No newline at end of file diff --git a/CK.SCP.Models/Enums/EquipmentState.cs b/CK.SCP.Models/Enums/EquipmentState.cs deleted file mode 100644 index 89b17d0..0000000 --- a/CK.SCP.Models/Enums/EquipmentState.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace CK.SCP.Models.Enums -{ - public enum EquipmentState - { - Idle, - InUsed, - Sent, - Maintaining, - Scraped - } -} \ No newline at end of file diff --git a/CK.SCP.Models/Enums/ErpInterfaceType.cs b/CK.SCP.Models/Enums/ErpInterfaceType.cs deleted file mode 100644 index 269dcae..0000000 --- a/CK.SCP.Models/Enums/ErpInterfaceType.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System.ComponentModel; - -namespace CK.SCP.Models.Enums -{ - public enum ErpInterfaceType - { - [Description("移库")] - TR, - [Description("回冲")] - BK, - MaterialIn, - MaterialOut, - ProductIn, - ProductOut, - [Description("销售")] - SH, - RCT - } -} \ No newline at end of file diff --git a/CK.SCP.Models/Enums/GroupType.cs b/CK.SCP.Models/Enums/GroupType.cs deleted file mode 100644 index 6e668a0..0000000 --- a/CK.SCP.Models/Enums/GroupType.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.ComponentModel; - -namespace CK.SCP.Models.Enums -{ - public enum GroupType - { - [Description("λ")] - Shelf = 0, - [Description("λ")] - Ground = 1, - [Description("߱߻")] - Wip = 2, - - } -} \ No newline at end of file diff --git a/CK.SCP.Models/Enums/InspectType.cs b/CK.SCP.Models/Enums/InspectType.cs deleted file mode 100644 index 68fb327..0000000 --- a/CK.SCP.Models/Enums/InspectType.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System.ComponentModel; - -namespace CK.SCP.Models.Enums -{ - public enum InspectType - { - [Description("")] - No = 0, - [Description("ȫ")] - All = 1, - [Description("")] - Partial = 2 - } -} \ No newline at end of file diff --git a/CK.SCP.Models/Enums/InspectionType.cs b/CK.SCP.Models/Enums/InspectionType.cs deleted file mode 100644 index 86e3c94..0000000 --- a/CK.SCP.Models/Enums/InspectionType.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System.ComponentModel; - -namespace CK.SCP.Models.Enums -{ - public enum InspectionType - { - //[Description("未知")] Unknow = 0, - [Description("首检")] InspectionFirst = 1, - [Description("巡检")] InspectionMed = 2, - [Description("末检")] InspectionLast = 3, - [Description("设备点检")] CheckEquipment = 4, - [Description("产品点检")] CheckProduction = 5, - } -} diff --git a/CK.SCP.Models/Enums/InventoryState.cs b/CK.SCP.Models/Enums/InventoryState.cs deleted file mode 100644 index b2559a4..0000000 --- a/CK.SCP.Models/Enums/InventoryState.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System.ComponentModel; - -namespace CK.SCP.Models.Enums -{ - public enum InventoryState - { - //状态 0:新建 1:已初盘 2:已重盘 3:已生成接口 -1:已取消 - [Description("新建")] - New = 0, - [Description("已初盘")] - Checked = 1, - [Description("已重盘")] - ReChecked = 2, - [Description("已生成接口")] - ToErp = 3, - [Description("取消")] - Cancelled = -1 - } -} \ No newline at end of file diff --git a/CK.SCP.Models/Enums/InvoiceState.cs b/CK.SCP.Models/Enums/InvoiceState.cs deleted file mode 100644 index 8754d9e..0000000 --- a/CK.SCP.Models/Enums/InvoiceState.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System.ComponentModel; - -namespace CK.SCP.Models.Enums -{ - public enum InvoiceState - { - [Description("新建")] - New = 0, - [Description("供应商申请")] - Apply = 1, - [Description("采购审核退回")] - CheckFail = 2, - [Description("采购审核通过")] - CheckSuccess = 3, - [Description("发票寄出")] - Mail = 4, - [Description("财务收票")] - FinanceReceive = 5, - [Description("财务退回")] - FinanceFail = 6, - [Description("发票作废")] - Reject = -1, - } -} \ No newline at end of file diff --git a/CK.SCP.Models/Enums/LocType.cs b/CK.SCP.Models/Enums/LocType.cs deleted file mode 100644 index ac74d6d..0000000 --- a/CK.SCP.Models/Enums/LocType.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.ComponentModel; - -namespace CK.SCP.Models.Enums -{ - public enum LocType - { - [Description("存储库位")] - Store = 0, - [Description("线边库位")] - Wip = 1, - [Description("功能库位")] - Functional = 2, - - } -} \ No newline at end of file diff --git a/CK.SCP.Models/Enums/LogType.cs b/CK.SCP.Models/Enums/LogType.cs deleted file mode 100644 index 25f7647..0000000 --- a/CK.SCP.Models/Enums/LogType.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace CK.SCP.Models.Enums -{ - public enum LogType - { - Login, - Logout, - BillCreate, - BillModify, - BillDelete, - BillCancel, - BaseDataCreate, - BaseDataModify, - BaseDataDisable, - BaseDataDelete, - StockMove - } -} \ No newline at end of file diff --git a/CK.SCP.Models/Enums/LoginState.cs b/CK.SCP.Models/Enums/LoginState.cs deleted file mode 100644 index 2a665fb..0000000 --- a/CK.SCP.Models/Enums/LoginState.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System.ComponentModel; - -namespace CK.SCP.Models.Enums -{ - public enum LoginState - { - [Description("登录失败,未知原因")] - Fault = 0, - [Description("登录成功")] - OK = 1, - [Description("错误的用户名或密码,登录失败!")] - BadCode = 2, - [Description("登录失败,尝试次数太多。稍后再试。")] - Itm = 3, - } -} diff --git a/CK.SCP.Models/Enums/ManageType.cs b/CK.SCP.Models/Enums/ManageType.cs deleted file mode 100644 index abef2c3..0000000 --- a/CK.SCP.Models/Enums/ManageType.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System.ComponentModel; - -namespace CK.SCP.Models.Enums -{ - public enum ManageType - { - [Description("批量")] - Batch =0, - [Description("单包装")] - SinglePack =1 - } -} \ No newline at end of file diff --git a/CK.SCP.Models/Enums/ManufactureProcedureType.cs b/CK.SCP.Models/Enums/ManufactureProcedureType.cs deleted file mode 100644 index 1f31cda..0000000 --- a/CK.SCP.Models/Enums/ManufactureProcedureType.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System.ComponentModel; - -namespace CK.SCP.Models.Enums -{ - - public enum ManufactureProcedureType - { - [Description("批量生产")] - Ordinary = 1, - [Description("试制")] - TrialManufacture = 2, - [Description("拆解返修")] - Disassembly = 3, - [Description("小修理")] - Replace = 4 - - } -} diff --git a/CK.SCP.Models/Enums/NotifyType.cs b/CK.SCP.Models/Enums/NotifyType.cs deleted file mode 100644 index 303be2f..0000000 --- a/CK.SCP.Models/Enums/NotifyType.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System.ComponentModel; - -namespace CK.SCP.Models.Enums -{ - public enum NotifyType - { - [Description("新增备料单")] - MaterialAsk=0, - [Description("未知客户物料号")] - UnknowCustPart=1, - [Description("新增检验单")] - Inspect=2, - [Description("新增生产计划单")] - ProducePlan=3, - [Description("新增发货计划单")] - DeliverPlan=4, - [Description("新增盘点计划单")] - InventoryPlan=5, - [Description("新增委外计划单")] - OmPlan=6, - [Description("VIN处理错误")] - VinError=7, - } -} \ No newline at end of file diff --git a/CK.SCP.Models/Enums/OperateType.cs b/CK.SCP.Models/Enums/OperateType.cs deleted file mode 100644 index 018e43d..0000000 --- a/CK.SCP.Models/Enums/OperateType.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace CK.SCP.Models.Enums -{ - public enum OperateType - { - Add, - Update, - Delete, - Cancel, - Finish - } -} \ No newline at end of file diff --git a/CK.SCP.Models/Enums/PartKind.cs b/CK.SCP.Models/Enums/PartKind.cs deleted file mode 100644 index ee93769..0000000 --- a/CK.SCP.Models/Enums/PartKind.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System.ComponentModel; - -namespace CK.SCP.Models.Enums -{ - public enum PartKind - { - [Description("ܳ")] - FG, - [Description("ԭ")] - RAW, - [Description("Ʒ")] - SUB - } -} \ No newline at end of file diff --git a/CK.SCP.Models/Enums/PartState.cs b/CK.SCP.Models/Enums/PartState.cs deleted file mode 100644 index 151be4e..0000000 --- a/CK.SCP.Models/Enums/PartState.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System.ComponentModel; - -namespace CK.SCP.Models.Enums -{ - public enum PartState - { - [Description("Actived")] - A, - [Description("Designing")] - D, - [Description("Hold")] - H, - [Description("Noneactived")] - N - - } -} \ No newline at end of file diff --git a/CK.SCP.Models/Enums/PartType.cs b/CK.SCP.Models/Enums/PartType.cs deleted file mode 100644 index 97d2ee7..0000000 --- a/CK.SCP.Models/Enums/PartType.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System.ComponentModel; - -namespace CK.SCP.Models.Enums -{ - - - public enum PartType - { - [Description("ɹ")] - B = 0, - [Description("Ƽ")] - M = 1, - [Description("ͻָ")] - D = 2, - [Description("ͻָ")] - DN = 21, - [Description("ͻָ")] - DY = 22, - [Description("ί")] - S = 3, - [Description("˾ɹ")] - Y = 4 - } -} \ No newline at end of file diff --git a/CK.SCP.Models/Enums/PlanDayState.cs b/CK.SCP.Models/Enums/PlanDayState.cs deleted file mode 100644 index 394c567..0000000 --- a/CK.SCP.Models/Enums/PlanDayState.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System.ComponentModel; - -namespace CK.SCP.Models.Enums -{ - - public enum PlanDayState - { - [Description("取消")] - Cancelled = -1, - [Description("新建")] - New = 0, - [Description("提交")] - Handling = 1, - [Description("已分配工单")] - Assigned = 2, - [Description("禁止自动分配工单")] - AssignDisable = 3, - [Description("完成")] - Finished = 4, - [Description("失败")] - Failed = 5, - } -} diff --git a/CK.SCP.Models/Enums/PlanState.cs b/CK.SCP.Models/Enums/PlanState.cs deleted file mode 100644 index b635c97..0000000 --- a/CK.SCP.Models/Enums/PlanState.cs +++ /dev/null @@ -1,144 +0,0 @@ -using System; -using System.ComponentModel; - -namespace CK.SCP.Models.Enums -{ - public enum PlanState - { - [Description("新建")] - New = 0, - [Description("发布")] - Release = 1, - [Description("已确认")] - Confirm = 2, - [Description("已发货")] - Ship = 3, - [Description("已收货")] - Receive = 4, - [Description("已完成")] - Complete = 5, - [Description("强制完结")] - CompleteForce = 6, - [Description("已作废")] - Reject = -1, - } - -/* public class F_StatePlan - { - public static int New = 0; - public static int Release = 1; - public static int Confirm = 2; - public static int Ship = 3; - public static int Receive = 4; - public static int Complete = 5; - public static int CompleteForce = 6; - public static int Reject = -1; - - public static string GetName(object State) - { - string ret = ""; - - if (Convert.ToInt32(State) == New) ret = "新建"; - if (Convert.ToInt32(State) == Release) ret = "发布"; - if (Convert.ToInt32(State) == Confirm) ret = "已确认"; - if (Convert.ToInt32(State) == Ship) ret = "已发货"; - if (Convert.ToInt32(State) == Receive) ret = "已收货"; - if (Convert.ToInt32(State) == Complete) ret = "已完成"; - if (Convert.ToInt32(State) == CompleteForce) ret = "强制完结"; - if (Convert.ToInt32(State) == Reject) ret = "已作废"; - - - return ret; - } - - } - public class F_StateShip - { - public static int New = 0; - public static int Ship = 1; - public static int Receive = 2; - public static int Reject = -1; - - public static string GetName(object State) - { - string ret = ""; - - if (Convert.ToInt32(State) == New) ret = "新建"; - if (Convert.ToInt32(State) == Ship) ret = "已发货"; - if (Convert.ToInt32(State) == Receive) ret = "已收货"; - if (Convert.ToInt32(State) == Reject) ret = "已作废"; - - - return ret; - } - - - - - - } - public class F_StateReceive - { - public static int Receive = 0; - public static int Check = 1; - public static int Invoice = 2; - - public static string GetName(object State) - { - string ret = ""; - - if (Convert.ToInt32(State) == Receive) ret = "已收货"; - if (Convert.ToInt32(State) == Check) ret = "审核通过"; - if (Convert.ToInt32(State) == Invoice) ret = "已开票"; - - return ret; - } - - } - - public class F_StateReceiveType - { - public static int Receive = 1; - public static int Return = 2; - - public static string GetName(object State) - { - string ret = ""; - - if (Convert.ToInt32(State) == Receive) ret = "收货单"; - if (Convert.ToInt32(State) == Return) ret = "退货单"; - - return ret; - } - - } - - public class F_StateInvoice - { - public static int New = 0; - public static int Apply = 1; - public static int CheckFail = 2; - public static int CheckSuccess = 3; - public static int Mail = 4; - public static int FinanceReceive = 5; - public static int FinanceFail = 6; - public static int Reject = -1; - - public static string GetName(object State) - { - string ret = ""; - - if (Convert.ToInt32(State) == New) ret = "新建"; - if (Convert.ToInt32(State) == Apply) ret = "供应商申请"; - if (Convert.ToInt32(State) == CheckFail) ret = "采购审核退回"; - if (Convert.ToInt32(State) == CheckSuccess) ret = "采购审核通过"; - if (Convert.ToInt32(State) == Mail) ret = "发票寄出"; - if (Convert.ToInt32(State) == FinanceFail) ret = "财务退回"; - if (Convert.ToInt32(State) == FinanceReceive) ret = "财务收票"; - if (Convert.ToInt32(State) == Reject) ret = "发票作废"; - - return ret; - } - - }*/ -} \ No newline at end of file diff --git a/CK.SCP.Models/Enums/PortalType.cs b/CK.SCP.Models/Enums/PortalType.cs deleted file mode 100644 index 3667b93..0000000 --- a/CK.SCP.Models/Enums/PortalType.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System.ComponentModel; - -namespace CK.SCP.Models.Enums -{ - public enum PortalType - { - [Description("ͻ")] - WinForm = 0, - [Description("վ")] - Web = 1, - [Description("ֳ")] - Pda = 2, - [Description("")] - Other = 3, - } -} \ No newline at end of file diff --git a/CK.SCP.Models/Enums/PrintType.cs b/CK.SCP.Models/Enums/PrintType.cs deleted file mode 100644 index f0db164..0000000 --- a/CK.SCP.Models/Enums/PrintType.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System.ComponentModel; - -namespace CK.SCP.Models.Enums -{ - public enum PrintType - { - [Description("直接打印")] - Print=0, - [Description("打印预览")] - PrintPreview=1 - } -} \ No newline at end of file diff --git a/CK.SCP.Models/Enums/Project.cs b/CK.SCP.Models/Enums/Project.cs deleted file mode 100644 index caa4dc0..0000000 --- a/CK.SCP.Models/Enums/Project.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.ComponentModel; - -namespace CK.SCP.Models.Enums -{ - public enum Project - { - [Description("CKPT")] - X261CC = 0, - [Description("DP")] - X261CDC = 1, - [Description("CNSL")] - X261CCC = 2, - - } -} \ No newline at end of file diff --git a/CK.SCP.Models/Enums/ProjectName.cs b/CK.SCP.Models/Enums/ProjectName.cs deleted file mode 100644 index d73c8b5..0000000 --- a/CK.SCP.Models/Enums/ProjectName.cs +++ /dev/null @@ -1,16 +0,0 @@ -namespace CK.SCP.Models.Enums -{ - public enum ProjectName - { - 锦州锦恒, - 常熟安通林, - 常熟安通林海虞专用, - 天津安通林, - 成都安通林, - - 天津迪安, - 长春繁荣, - 重庆北汽模塑, - 江苏锦恒, - } -} \ No newline at end of file diff --git a/CK.SCP.Models/Enums/ReceiveBillType.cs b/CK.SCP.Models/Enums/ReceiveBillType.cs deleted file mode 100644 index b69905f..0000000 --- a/CK.SCP.Models/Enums/ReceiveBillType.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System.ComponentModel; - -namespace CK.SCP.Models.Enums -{ - public enum ReceiveBillType - { - [Description("收货单")] - Receive = 1, - [Description("退货单")] - Reject = 2, - } -} \ No newline at end of file diff --git a/CK.SCP.Models/Enums/ReceiveState.cs b/CK.SCP.Models/Enums/ReceiveState.cs deleted file mode 100644 index 5ec6ff1..0000000 --- a/CK.SCP.Models/Enums/ReceiveState.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System.ComponentModel; - -namespace CK.SCP.Models.Enums -{ - public enum ReceiveState - { - [Description("已收货")] - Receive = 0, - [Description("审核通过")] - Check = 1, - [Description("待开票")] - Invoice = 2, - } -} \ No newline at end of file diff --git a/CK.SCP.Models/Enums/ResultCode.cs b/CK.SCP.Models/Enums/ResultCode.cs deleted file mode 100644 index db87c27..0000000 --- a/CK.SCP.Models/Enums/ResultCode.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System.ComponentModel; - -namespace CK.SCP.Models.Enums -{ - public enum ResultCode - { - [Description("成功")] - Success = 0, - [Description("警告")] - Warning = 1, - [Description("连接错误")] - ErrorConnection = 1001, - [Description("未找到数据")] - DataNotFound = 2001, - [Description("数据已存在")] - DataAlreadyExist = 2002, - [Description("数据状态错误")] - DataStateError = 2003, - [Description("数量错误")] - DataQtyError=2004, - - [Description("发现新零件")] - NewCustPart = 4001, - [Description("系统错误")] - Exception=-1, - [Description("数据校验失败")] - DbEntityValidationException=-2, - - [Description("库存不足")] - StockNotEnough, - } -} \ No newline at end of file diff --git a/CK.SCP.Models/Enums/ServiceType.cs b/CK.SCP.Models/Enums/ServiceType.cs deleted file mode 100644 index 0313904..0000000 --- a/CK.SCP.Models/Enums/ServiceType.cs +++ /dev/null @@ -1,52 +0,0 @@ -namespace CK.SCP.Models.Enums -{ - public enum ServiceType - { - GetConfigList, - GetWhseList, - GetAreaList, - GetGroupList, - GetLocList, - GetPartList, - GetVendPartList, - GetCustPartList, - GetSupplierList, - GetCustomerList, - GetShiftList, - GetTeamList, - GetWorklineList, - GetBomList, - - GetBarcode, - - GetLocByLocCode, - GetPartByPartCode, - GetPartByErpPartCode, - GetCustPartByCustPartCode, - GetPoByCode, - GetAsnByCode, - GetProducePlanByCode, - GetSoByCode, - GetEqptByCode, - - GetStock, - GetStockList, - - GetBill, - GetBillList, - GetSourceBill, - - AddBill, - StartBill, - - InventoryLoc, - FinishBill, - GetInventoryLoc, - GetStockDetailList, - CancelBill, - GetOtscById, - GetPdaPowerMenu, - GetSubBillTypeList, - UnlockLoc - } -} \ No newline at end of file diff --git a/CK.SCP.Models/Enums/ShipState.cs b/CK.SCP.Models/Enums/ShipState.cs deleted file mode 100644 index 3c04fd9..0000000 --- a/CK.SCP.Models/Enums/ShipState.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System.ComponentModel; - -namespace CK.SCP.Models.Enums -{ - public enum ShipState - { - [Description("新建")] - New = 0, - [Description("已发货")] - Ship =1, - [Description("已收货")] - Receive = 2, - [Description("已作废")] - Reject = -1, - } -} \ No newline at end of file diff --git a/CK.SCP.Models/Enums/StockState.cs b/CK.SCP.Models/Enums/StockState.cs deleted file mode 100644 index 0c1b1c4..0000000 --- a/CK.SCP.Models/Enums/StockState.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System.ComponentModel; - -namespace CK.SCP.Models.Enums -{ - public enum StockState - { - [Description("待检")] - Inspect=0, - [Description("合格")] - Valid = 1, - [Description("不合格")] - InValid = 2, - [Description("过期")] - Overdue = 3, - [Description("待判定")] - Hold = 4, - } -} \ No newline at end of file diff --git a/CK.SCP.Models/Enums/StockWhereType.cs b/CK.SCP.Models/Enums/StockWhereType.cs deleted file mode 100644 index 6d4d2ef..0000000 --- a/CK.SCP.Models/Enums/StockWhereType.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace CK.SCP.Models.Enums -{ - public enum StockWhereType - { - BarCode, - LocCode, - BarCodeAndLocCode, - EqptCode, - PartCode - } -} \ No newline at end of file diff --git a/CK.SCP.Models/Enums/StopLineType.cs b/CK.SCP.Models/Enums/StopLineType.cs deleted file mode 100644 index 268dcad..0000000 --- a/CK.SCP.Models/Enums/StopLineType.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System.ComponentModel; - -namespace CK.SCP.Models.Enums -{ - /// <summary> - /// 停线类型。也就是停线原因。 - /// </summary> - public enum StopLineType - { - [Description("质量问题")] QA = 1, - [Description("设备问题")] EQ = 2, - [Description("缺料")] Mat = 3, - [Description("工艺设计问题")] ProcessDesign = 4, - } - - /// <summary> - /// 停线事故等级。枚举值必须从小到大排列.以后要改的话,必须注意。要逐级触发系统动作的。 - /// </summary> - public enum StopLineLevel - { - [Description("轻度")] Minimum = 100, - [Description("一般")] Commonly = 200, - [Description("严重")] Serious = 300, - [Description("重大")] Weighty = 400, - } -} \ No newline at end of file diff --git a/CK.SCP.Models/Enums/StoreArea.cs b/CK.SCP.Models/Enums/StoreArea.cs deleted file mode 100644 index 22eb637..0000000 --- a/CK.SCP.Models/Enums/StoreArea.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System.ComponentModel; - -namespace CK.SCP.Models.Enums -{ - public enum StoreArea - { - [Description("原料库")] - RAW=11, - [Description("线边库")] - WIP=21, - [Description("成品库")] - FG=12, - [Description("销售库")] - SALE=13, - [Description("隔离库")] - HOLD=22, - [Description("在途库")] - ROAD=14, - [Description("其它库")] - OTHER=15, - [Description("废品库")] - SCRAP=23, - [Description("半成品库")] - HF=16, - [Description("待检库")] - INSPECT=0, - [Description("委外库")] - OS = 17, - [Description("备品库")] - AST - } -} \ No newline at end of file diff --git a/CK.SCP.Models/Enums/SubBillType.cs b/CK.SCP.Models/Enums/SubBillType.cs deleted file mode 100644 index 9c2eb90..0000000 --- a/CK.SCP.Models/Enums/SubBillType.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System.ComponentModel; - -namespace CK.SCP.Models.Enums -{ - public enum SubBillType - { - //其它出入库-出库 - [Description("其它出库")] - OtherOut = 30101, - //[Description("原料退货")] - //ReturnToSupplier=30102, - [Description("盘盈单")] - InventoryProfit = 30103, - [Description("报废销毁")] - ScrapDestroy=30104, - - //其它出入库-入库 - [Description("其它入库")] - OtherIn = 30111, - //[Description("销售退货")] - //ProductReturn=30112, - [Description("盘亏单")] - InventoryLoss=30113, - - //其它出入库-移库 - [Description("成品隔离")] - ProductUndecide = 30131, - //[Description("成品返修")] - //ProductRepair = 30132, - [Description("成品报废")] - ProductScrap = 30133, - //[Description("生产退库")] - //BackToStore = 30134, - - - //移库 - [Description("移库单")] - StockMove = 30201, - [Description("原料入库单")] - MaterialStockIn = 30202, - [Description("成品入库单")] - ProductStockIn = 30203, - [Description("成品出库单")] - ProductStockOut = 30204, - [Description("原料出库单")] - PartPickFact = 30205, - - - //采购收货 - [Description("订单收货单")] - PoReceive = 10101, - [Description("ASN收货单")] - AsnReceive = 10102, - - } -} \ No newline at end of file diff --git a/CK.SCP.Models/Enums/UniApiState.cs b/CK.SCP.Models/Enums/UniApiState.cs deleted file mode 100644 index 6d61d04..0000000 --- a/CK.SCP.Models/Enums/UniApiState.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace CK.SCP.Models.Enums -{ - public enum UniApiState - { - 待执行 = 0, - 成功 = 1, - 失败 = 2, - 其它 = 9, - } -} \ No newline at end of file diff --git a/CK.SCP.Models/Enums/UniApiType.cs b/CK.SCP.Models/Enums/UniApiType.cs deleted file mode 100644 index 1db54bd..0000000 --- a/CK.SCP.Models/Enums/UniApiType.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System.ComponentModel; - -namespace CK.SCP.Models.Enums -{ - public enum UniApiType - { - [Description("订单")] - PO, - [Description("收货")] - Receive, - [Description("条码")] - BarCode, - [Description("发票")] - Invoice, - - } -} \ No newline at end of file diff --git a/CK.SCP.Models/Enums/VinState.cs b/CK.SCP.Models/Enums/VinState.cs deleted file mode 100644 index e022093..0000000 --- a/CK.SCP.Models/Enums/VinState.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System.ComponentModel; - -namespace CK.SCP.Models.Enums -{ - public enum VinState - { - [Description("已收货")] - Received = 0, - [Description("部分收货")] - Partial = 111, - [Description("已发货")] - Delivered = 222, - [Description("销售中")] - Selling = 300, - [Description("已销售")] - Sold = 333, - [Description("已比对")] - Balanced = 999, - [Description("不存在数据")] - DataNotFound = -1, - } -} \ No newline at end of file diff --git a/CK.SCP.Models/Enums/WhseType.cs b/CK.SCP.Models/Enums/WhseType.cs deleted file mode 100644 index 273ed72..0000000 --- a/CK.SCP.Models/Enums/WhseType.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System.ComponentModel; - -namespace CK.SCP.Models.Enums -{ - public enum WhseType - { - [Description("ֿ")] - ProduceWhse = 0, - [Description("ֿ")] - ThirdWhse = 1, - } -} \ No newline at end of file diff --git a/CK.SCP.Models/Enums/WorkLineType.cs b/CK.SCP.Models/Enums/WorkLineType.cs deleted file mode 100644 index 9f0891d..0000000 --- a/CK.SCP.Models/Enums/WorkLineType.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System.ComponentModel; - -namespace CK.SCP.Models.Enums -{ - public enum WorkLineType - { - [Description("װ")] - Assemble = 0, - - } -} \ No newline at end of file diff --git a/CK.SCP.Models/GlobalConfig.cs b/CK.SCP.Models/GlobalConfig.cs deleted file mode 100644 index 9cdfe57..0000000 --- a/CK.SCP.Models/GlobalConfig.cs +++ /dev/null @@ -1,62 +0,0 @@ -using System; -using CK.SCP.Utils; -namespace CK.SCP.Models -{ - - public static class GlobalConfig - { - public const string ScpDbFileName = "Scp数据库设置.ini"; - public const string AppBoxDbFileName = "AppBox数据库设置.ini"; - public const string UniApiDbFileName = "接口数据库设置.ini"; - public const string UniApiConfigFileName = "ERP接口设置.ini"; - public const string DurationFileName = "执行周期设置.ini"; - public const string UpdateFileName = "自动更新设置.ini"; - - - - private static DbSetting _scpDatabase; - private static DbSetting _appboxDatabase; - private static DbSetting _uniApiDatabase; - - - public static DbSetting ScpDatabase - { - get { return _scpDatabase ?? (_scpDatabase = GetConfigValues<DbSetting>(ScpDbFileName)); } - - set { _scpDatabase = value; } - } - - public static DbSetting AppBoxDatabase - { - get { return _appboxDatabase ?? (_appboxDatabase = GetConfigValues<DbSetting>(AppBoxDbFileName)); } - - set { _appboxDatabase = value; } - } - - public static DbSetting UniApiDatabase - { - get { return _uniApiDatabase ?? (_uniApiDatabase = GetConfigValues<DbSetting>(UniApiDbFileName)); } - - set { _uniApiDatabase = value; } - } - - - - public static T GetConfigValues<T>(string filename) where T : new() - { - T t = new T(); - if (FileHelper.Exists(filename)) - { - t = JsonHelper.ReadConfigFromFile<T>(filename); - } - else - { - throw new Exception($"配置文件{filename}丢失,请重新配置"); - } - - return t; - } - - - } -} \ No newline at end of file diff --git a/CK.SCP.Models/Properties/AssemblyInfo.cs b/CK.SCP.Models/Properties/AssemblyInfo.cs deleted file mode 100644 index 76f2698..0000000 --- a/CK.SCP.Models/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// 有关程序集的一般信息由以下 -// 控制。更改这些特性值可修改 -// 与程序集关联的信息。 -[assembly: AssemblyTitle("CK.SCP.Models")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("CK.SCP.Models")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2018")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -//将 ComVisible 设置为 false 将使此程序集中的类型 -//对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型, -//请将此类型的 ComVisible 特性设置为 true。 -[assembly: ComVisible(false)] - -// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID -[assembly: Guid("dd7c0def-71e7-443f-b0b7-db2f5b12a506")] - -// 程序集的版本信息由下列四个值组成: -// -// 主版本 -// 次版本 -// 生成号 -// 修订号 -// -//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, -// 方法是按如下所示使用“*”: : -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/CK.SCP.Models/SCPException.cs b/CK.SCP.Models/SCPException.cs deleted file mode 100644 index dbc606c..0000000 --- a/CK.SCP.Models/SCPException.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System; -using System.Text; -using CK.SCP.Models.Enums; -using CK.SCP.Utils; - -namespace CK.SCP.Models -{ - [Serializable] //声明为可序列化的 因为要写入文件中 - public class ScpException : ApplicationException //由用户程序引发,用于派生自定义的异常类型 - { - private const string SP = ";"; - // private ResultCode _code; - // private string _indexString; - public ResultCode Code { get; set; } - public string IndexString { get; set; } - - /// <summary> - /// 默认构造函数 - /// </summary> - public ScpException() - { - } - - public ScpException(ResultCode code, string indexString = null, string message = null, ScpException inner = null) - : base(message, inner) - { - Code = code; - IndexString = indexString; - } - - public ScpException(string message) - { -// throw new NotImplementedException(); - } - - // public WmsException(System.Runtime.Serialization.SerializationInfo info, - // System.Runtime.Serialization.StreamingContext context) : base(info, context) - // { - // _indexString = info.GetString(IndexString); - // } - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append(EnumHelper.GetDescription(Code) + SP); - sb.Append(IndexString + SP); - sb.Append(Message + SP); - return sb.ToString(); - } - } -} diff --git a/CK.SCP.Models/ScpCache.cs b/CK.SCP.Models/ScpCache.cs deleted file mode 100644 index f735bd5..0000000 --- a/CK.SCP.Models/ScpCache.cs +++ /dev/null @@ -1,193 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using CK.SCP.Models.AppBoxEntity; -using CK.SCP.Models.Enums; -using CK.SCP.Models.ScpEntity; -using CK.SCP.Utils; - -namespace CK.SCP.Models -{ - public static class ScpCache - { - private static readonly ScpEntities ScpDb = EntitiesFactory.CreateScpInstance(); - private static readonly AppBoxContext Db = EntitiesFactory.CreateAppBoxInstance(); - - private static List<TA_VENDER> _vendList; - private static List<TA_PART> _PartList; - private static List<User> _usersList; - private static List<TB_RECEIVE> _ReceiveList; - - - - private static ScpConfig _config; - public static ScpConfig Config - - { - get { return _config ?? (_config = GetConfig(ScpDb)); } - set { _config = value; } - } - - private static ScpConfig GetConfig(ScpEntities db) - { - var config = new ScpConfig(); - var peroperties = config.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance); - var configList = GetDbConfigList(db); - foreach (var pi in peroperties) - { - var piName = pi.Name.ToUpper(); - foreach (var cfg in configList) - { - if (cfg.ParamName != piName) continue; - var value = ListHelper.ConvertToType(cfg.ParamValue, pi.PropertyType); - if (!pi.CanWrite) continue; - try - { - pi.SetValue(config, value, null); - break; - } - catch (Exception ex) - { - MessageHelper.ShowError(ex); - throw; - } - } - } - return config; - } - - private static void SetConfig(ScpEntities db, ScpConfig config) - { - - var peroperties = config.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance); - var configList = GetDbConfigList(db); - foreach (var pi in peroperties) - { - var piName = pi.Name.ToUpper(); - if (configList.Any(p => p.ParamName.ToUpper() == piName)) continue; - var cfg = new TA_CONFIG - { - ParamName = piName, - ParamValue = pi.GetValue(Config, null).ToString(), - State = 1, - Remark = piName, - }; - db.TA_CONFIG.Add(cfg); - } - EntitiesFactory.SaveDb(db); - } - - public static List<TA_CONFIG> GetDbConfigList(ScpEntities db) - { - return db.TA_CONFIG.OrderByDescending(p => p.UID).ToList(); - } - public static void Refresh(ScpEntities db) - { - try - { - Config = GetConfig(db); - SetConfig(db, Config); - } - catch (Exception ex) - { - - throw new Exception( - $"系统无法连接到{GlobalConfig.ScpDatabase.数据库类型}数据库:{GlobalConfig.ScpDatabase.服务器地址},请检查配置的服务器,数据库,用户名和密码等信息是否正确。"); - - } - - } - - public static string GetVendName(string vendId) - { - return VenderList.SingleOrDefault(p => p.VendId == vendId)?.VendName ?? string.Empty; - } - public static string GetVendIDByUser(string name) - { - return UsersList.SingleOrDefault(p => p.Name == name)?.SupplierCode ?? string.Empty; - } - public static string GetPartDesc(string wmsDataPartCode) - { - return ""; - } - - public static DateTime GetServerTime() - { - return DateTime.Now; - } - public static List<TA_VENDER> VenderList - { - get - { - if (_vendList == null || _vendList.Count == 0) - { - _vendList = ScpDb.TA_VENDER.ToList(); - } - return _vendList; - } - set { _vendList = value; } - } - public static List<User> UsersList - { - get - { - if (_usersList == null || _usersList.Count == 0) - { - _usersList = Db.Users.ToList(); - } - return _usersList; - } - set { _usersList = value; } - } - public static List<TA_PART> PartList - { - get - { - if (_PartList == null || _PartList.Count == 0) - { - _PartList = ScpDb.TA_PART.ToList(); - } - return _PartList; - } - set { _PartList = value; } - } - public static string GetPartDesc1(string partCode) - { - return PartList.SingleOrDefault(p => p.PartCode == partCode)?.PartDesc1 ?? string.Empty; - } - public static List<TB_RECEIVE> ReceiveList - { - get - { - if (_ReceiveList == null || _ReceiveList.Count == 0) - { - _ReceiveList = ScpDb.TB_RECEIVE.ToList(); - } - return _ReceiveList; - } - set { _ReceiveList = value; } - } - public static string GetReceivePoBillNum(string billnum) - { - return ReceiveList.SingleOrDefault(p => p.BillNum == billnum)?.PoBillNum ?? string.Empty; - } - public static string GetReceiveAsnBillNum(string billnum) - { - return ReceiveList.SingleOrDefault(p => p.BillNum == billnum)?.AsnBillNum ?? string.Empty; - } - } - public class ScpConfig - { - public string QAD域 { get; set; } = "JZ1"; - public string QAD地点 { get; set; } = "0100"; - public string WMS接口数据流水号格式 { get; set; } = "yyMMdd_HHmmssffff"; - - public string 项目名称 { get; set; } = "锦恒项目"; - public string WMS用户名 { get; set; } = "W"; - - public string SCP用户名 { get; set; } = "SCP"; - public string SCP接口数据流水号格式 { get; set; } = "yyMMdd_HHmmssffff"; - - } -} \ No newline at end of file diff --git a/CK.SCP.Models/ScpEntities.cs b/CK.SCP.Models/ScpEntities.cs deleted file mode 100644 index f0446cf..0000000 --- a/CK.SCP.Models/ScpEntities.cs +++ /dev/null @@ -1,258 +0,0 @@ -using System.Data.Entity; -using CK.SCP.Models.ScpEntity; - -namespace CK.SCP.Models -{ - - - public class SqlDbConfiguration : DbConfiguration - { - public SqlDbConfiguration() - { - this.SetManifestTokenResolver(new Sql2008ManifestTokenResolver()); - } - } - public class Sql2008ManifestTokenResolver : System.Data.Entity.Infrastructure.IManifestTokenResolver - { - public string ResolveManifestToken(System.Data.Common.DbConnection connection) - { - return "2008"; - } - } - - - public partial class ScpEntities : DbContext - { - public ScpEntities() - : base("name=ScpEntities") - { - } - public ScpEntities(string strConn) - : base(strConn) - { - } - - public virtual DbSet<TA_BILLTYPE> TA_BILLTYPE { get; set; } - public virtual DbSet<TA_CONFIG> TA_CONFIG { get; set; } - public virtual DbSet<TA_PART> TA_PART { get; set; } - public virtual DbSet<TA_VEND_PART> TA_VEND_PART { get; set; } - public virtual DbSet<TA_VENDER> TA_VENDER { get; set; } - public virtual DbSet<TB_INVOICE> TB_INVOICE { get; set; } - public virtual DbSet<TB_INVOICE_DETAIL> TB_INVOICE_DETAIL { get; set; } - public virtual DbSet<TB_RECEIVE> TB_RECEIVE { get; set; } - public virtual DbSet<TB_RECEIVE_DETAIL> TB_RECEIVE_DETAIL { get; set; } - public virtual DbSet<TB_RETURN> TB_RETURN { get; set; } - public virtual DbSet<TB_RETURN_DETAIL> TB_RETURN_DETAIL { get; set; } - public virtual DbSet<TF_ASN> TF_ASN { get; set; } - public virtual DbSet<TF_ASN_DETAIL> TF_ASN_DETAIL { get; set; } - public virtual DbSet<TF_PO> TF_PO { get; set; } - public virtual DbSet<TF_PO_DETAIL> TF_PO_DETAIL { get; set; } - public virtual DbSet<TL_BASEDATA> TL_BASEDATA { get; set; } - public virtual DbSet<TL_BILL> TL_BILL { get; set; } - public virtual DbSet<TL_OPER> TL_OPER { get; set; } - public virtual DbSet<TS_BARCODE> TS_BARCODE { get; set; } - public virtual DbSet<TS_STOCK> TS_STOCK { get; set; } - public virtual DbSet<TS_UNI_API> TS_UNI_API { get; set; } - public virtual DbSet<TS_UNI_API_HIS> TS_UNI_API_HIS { get; set; } - public virtual DbSet<TT_CURRENCY> TT_CURRENCY { get; set; } - public virtual DbSet<TT_PROJECT> TT_PROJECT { get; set; } - - public virtual DbSet<TT_UNIT> TT_UNIT { get; set; } - public virtual DbSet<V_POAll> V_POAll { get; set; } - public virtual DbSet<V_POAllDetail> V_POAllDetail { get; set; } - - public virtual DbSet<V_BillShip> V_BillShip { get; set; } - public virtual DbSet<V_Receive> V_Receive { get; set; } - - public virtual DbSet<V_BillShipDetail> V_BillShipDetail { get; set; } - public virtual DbSet<V_ReceiveDetail> V_ReceiveDetail { get; set; } - public virtual DbSet<V_BillInvoice> V_BillInvoice { get; set; } - - public virtual DbSet<V_BillInvoiceDetail> V_BillInvoiceDetail { get; set; } - - public virtual DbSet<V_POReport> V_POReport { get; set; } - public virtual DbSet<V_ReceiveReport> V_ReceiveReport { get; set; } - public virtual DbSet<V_QadOrder> V_QadOrder { get; set; } - public virtual DbSet<TB_QadOrder> TB_QadOrder { get; set; } - public virtual DbSet<TB_QadOrderDetail> TB_QadOrderDetail { get; set; } - - - public virtual DbSet<V_PlanMonth> V_PlanMonth { get; set; } - public virtual DbSet<TB_PlanMonth> TB_PlanMonth { get; set; } - public virtual DbSet<V_Stock> V_Stock { get; set; } - public virtual DbSet<V_Info> V_Info { get; set; } - public virtual DbSet<TA_Info> TA_Info { get; set; } - public virtual DbSet<TB_PublicData> TB_PublicData { get; set; } - public virtual DbSet<TA_BillNoType> TA_BillNoType { get; set; } - public virtual DbSet<TA_VEND_USER> TA_VEND_USER { get; set; } - public virtual DbSet<TA_Part_User> TA_Part_User { get; set; } - // public virtual DbSet<V_ReceiveList> V_ReceiveList { get; set; } - - - - - - - - protected override void OnModelCreating(DbModelBuilder modelBuilder) - { - modelBuilder.Entity<TA_BILLTYPE>() - .Property(e => e.Sep) - .IsUnicode(false); - - modelBuilder.Entity<TA_PART>() - .Property(e => e.State) - .IsUnicode(false); - - modelBuilder.Entity<TA_VEND_PART>() - .Property(e => e.VendPackQty) - .HasPrecision(18, 5); - - modelBuilder.Entity<TA_VENDER>() - .Property(e => e.VendAbbCode) - .IsUnicode(false); - - modelBuilder.Entity<TB_INVOICE_DETAIL>() - .Property(e => e.Qty) - .HasPrecision(19, 4); - - modelBuilder.Entity<TB_INVOICE_DETAIL>() - .Property(e => e.Price) - .HasPrecision(19, 4); - - modelBuilder.Entity<TB_INVOICE_DETAIL>() - .Property(e => e.PackQty) - .HasPrecision(19, 4); - - modelBuilder.Entity<TB_RECEIVE_DETAIL>() - .Property(e => e.BillQty) - .HasPrecision(19, 4); - - modelBuilder.Entity<TB_RECEIVE_DETAIL>() - .Property(e => e.ReceivedQty) - .HasPrecision(19, 4); - - modelBuilder.Entity<TB_RECEIVE_DETAIL>() - .Property(e => e.Price) - .HasPrecision(19, 4); - - - - modelBuilder.Entity<TB_RETURN_DETAIL>() - .Property(e => e.BillQty) - .HasPrecision(19, 4); - - modelBuilder.Entity<TB_RETURN_DETAIL>() - .Property(e => e.ReceivedQty) - .HasPrecision(19, 4); - - modelBuilder.Entity<TB_RETURN_DETAIL>() - .Property(e => e.Price) - .HasPrecision(19, 4); - - modelBuilder.Entity<TB_RETURN_DETAIL>() - .Property(e => e.PackQty) - .HasPrecision(19, 4); - - modelBuilder.Entity<TF_ASN_DETAIL>() - .Property(e => e.BillQty) - .HasPrecision(19, 4); - - modelBuilder.Entity<TF_ASN_DETAIL>() - .Property(e => e.Price) - .HasPrecision(19, 4); - - modelBuilder.Entity<TF_ASN_DETAIL>() - .Property(e => e.PackQty) - .HasPrecision(19, 4); - - modelBuilder.Entity<TF_PO_DETAIL>() - .Property(e => e.BillQty) - .HasPrecision(19, 4); - - modelBuilder.Entity<TF_PO_DETAIL>() - .Property(e => e.ShippedQty) - .HasPrecision(19, 4); - - modelBuilder.Entity<TF_PO_DETAIL>() - .Property(e => e.ReceivedQty) - .HasPrecision(19, 4); - - modelBuilder.Entity<TF_PO_DETAIL>() - .Property(e => e.Price) - .HasPrecision(19, 4); - - modelBuilder.Entity<TF_PO_DETAIL>() - .Property(e => e.PackQty) - .HasPrecision(19, 4); - - modelBuilder.Entity<TL_BASEDATA>() - .Property(e => e.LogType) - .IsUnicode(false); - - modelBuilder.Entity<TL_BASEDATA>() - .Property(e => e.DataType) - .IsUnicode(false); - - modelBuilder.Entity<TL_OPER>() - .Property(e => e.LogType) - .IsUnicode(false); - - modelBuilder.Entity<TS_BARCODE>() - .Property(e => e.BarCode) - .IsUnicode(false); - - modelBuilder.Entity<TS_BARCODE>() - .Property(e => e.FullBarCode) - .IsUnicode(false); - - modelBuilder.Entity<TS_BARCODE>() - .Property(e => e.PartCode) - .IsUnicode(false); - - modelBuilder.Entity<TS_BARCODE>() - .Property(e => e.VendPartCode) - .IsUnicode(false); - - modelBuilder.Entity<TS_BARCODE>() - .Property(e => e.Batch) - .IsUnicode(false); - - modelBuilder.Entity<TS_BARCODE>() - .Property(e => e.ProduceDate) - .HasPrecision(3); - - modelBuilder.Entity<TS_BARCODE>() - .Property(e => e.SerialNum) - .IsUnicode(false); - - modelBuilder.Entity<TS_BARCODE>() - .Property(e => e.Qty) - .HasPrecision(19, 4); - - modelBuilder.Entity<TS_BARCODE>() - .Property(e => e.BillNum) - .IsUnicode(false); - - modelBuilder.Entity<TS_BARCODE>() - .Property(e => e.VendId) - .IsUnicode(false); - - modelBuilder.Entity<TS_BARCODE>() - .Property(e => e.PackQty) - .HasPrecision(19, 4); - - modelBuilder.Entity<TS_STOCK>() - .Property(e => e.Qty) - .HasPrecision(19, 4); - - modelBuilder.Entity<TS_UNI_API>() - .Property(e => e.Qty) - .HasPrecision(18, 5); - - modelBuilder.Entity<TS_UNI_API_HIS>() - .Property(e => e.Qty) - .HasPrecision(18, 5); - } - } -} diff --git a/CK.SCP.Models/ScpEntity/ERP_ORDER.cs b/CK.SCP.Models/ScpEntity/ERP_ORDER.cs deleted file mode 100644 index b595431..0000000 --- a/CK.SCP.Models/ScpEntity/ERP_ORDER.cs +++ /dev/null @@ -1,36 +0,0 @@ -//------------------------------------------------------------------------------ -// <auto-generated> -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// </auto-generated> -//------------------------------------------------------------------------------ - -namespace CK.SCP.Models.ScpEntity -{ - using System; - using System.Collections.Generic; - - using System.ComponentModel.DataAnnotations; - using System.ComponentModel.DataAnnotations.Schema; - - - public partial class ERP_ORDER - { - public int UID { get; set; } - public string ErpBillNum { get; set; } - public string VendId { get; set; } - public string ModType { get; set; } - public string Contacter { get; set; } - public string Site { get; set; } - public string Buyer { get; set; } - public string BuyerPhone { get; set; } - public string Address { get; set; } - public int State { get; set; } - public string Remark { get; set; } - public System.DateTime CreateTime { get; set; } - public string CreateUser { get; set; } - public System.Guid GUID { get; set; } - } -} diff --git a/CK.SCP.Models/ScpEntity/ERP_ORDER_DETAIL.cs b/CK.SCP.Models/ScpEntity/ERP_ORDER_DETAIL.cs deleted file mode 100644 index f812a83..0000000 --- a/CK.SCP.Models/ScpEntity/ERP_ORDER_DETAIL.cs +++ /dev/null @@ -1,33 +0,0 @@ -//------------------------------------------------------------------------------ -// <auto-generated> -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// </auto-generated> -//------------------------------------------------------------------------------ - -namespace CK.SCP.Models.ScpEntity -{ - using System; - using System.Collections.Generic; - - public partial class ERP_ORDER_DETAIL - { - public int UID { get; set; } - public string ErpBillNum { get; set; } - public int PoLine { get; set; } - public string PartCode { get; set; } - public decimal PartPrice { get; set; } - public Nullable<System.DateTime> BeginTime { get; set; } - public Nullable<System.DateTime> EndTime { get; set; } - public decimal PlanQty { get; set; } - public decimal ClosedQty { get; set; } - public string DockCode { get; set; } - public int State { get; set; } - public string Remark { get; set; } - public System.DateTime CreateTime { get; set; } - public string CreateUser { get; set; } - public System.Guid GUID { get; set; } - } -} diff --git a/CK.SCP.Models/ScpEntity/QadOrder.cs b/CK.SCP.Models/ScpEntity/QadOrder.cs deleted file mode 100644 index fa3b2b8..0000000 --- a/CK.SCP.Models/ScpEntity/QadOrder.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace CK.SCP.Models.ScpEntity -{ - public class QadOrder - { - [Key] - public decimal ID { get; set; } - - [StringLength(50)] - public string BillNo { get; set; } - - [StringLength(50)] - public string SupplierCode { get; set; } - - public DateTime StartDate { get; set; } - - public DateTime EndDate { get; set; } - - - [StringLength(50)] - public string Address { get; set; } - - - [StringLength(50)] - public string ProductCode { get; set; } - - - public decimal Qty { get; set; } - - - [StringLength(50)] - public string PartName { get; set; } - - - [StringLength(50)] - public string VendName { get; set; } - } -} diff --git a/CK.SCP.Models/ScpEntity/TA_BILLTYPE.cs b/CK.SCP.Models/ScpEntity/TA_BILLTYPE.cs deleted file mode 100644 index f4b17ce..0000000 --- a/CK.SCP.Models/ScpEntity/TA_BILLTYPE.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace CK.SCP.Models.ScpEntity -{ - public partial class TA_BILLTYPE - { - [DatabaseGenerated(DatabaseGeneratedOption.Identity)] - public int UID { get; set; } - - [Key] - [DatabaseGenerated(DatabaseGeneratedOption.None)] - public int BillType { get; set; } - - [Required] - [StringLength(50)] - public string TypeName { get; set; } - - [Required] - [StringLength(50)] - public string TypeDesc { get; set; } - - public int State { get; set; } - - [Required] - [StringLength(50)] - public string Prefix { get; set; } - - [Required] - [StringLength(500)] - public string BillNumRule { get; set; } - - public int LastNumber { get; set; } - - [StringLength(50)] - public string LastBillNum { get; set; } - - public DateTime LastBillTime { get; set; } - - [StringLength(500)] - public string PrintTemplateFileName { get; set; } - - [StringLength(500)] - public string ImportTemplateFileName { get; set; } - - [StringLength(50)] - public string Sep { get; set; } - - public int PaperOrientation { get; set; } - } -} diff --git a/CK.SCP.Models/ScpEntity/TA_BillNoType.cs b/CK.SCP.Models/ScpEntity/TA_BillNoType.cs deleted file mode 100644 index 04fe0de..0000000 --- a/CK.SCP.Models/ScpEntity/TA_BillNoType.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace CK.SCP.Models.ScpEntity -{ - public class TA_BillNoType - { - [Key] - [DatabaseGenerated(DatabaseGeneratedOption.Identity)] - public int ID { get; set; } - - public int? sYear { get; set; } - public int? sMonth { get; set; } - public int? sDay { get; set; } - public int? sValue { get; set; } - - [StringLength(50)] - public string Prefix { get; set; } - } -} diff --git a/CK.SCP.Models/ScpEntity/TA_CONFIG.cs b/CK.SCP.Models/ScpEntity/TA_CONFIG.cs deleted file mode 100644 index e53cc7a..0000000 --- a/CK.SCP.Models/ScpEntity/TA_CONFIG.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace CK.SCP.Models.ScpEntity -{ - public partial class TA_CONFIG - { - [DatabaseGenerated(DatabaseGeneratedOption.Identity)] - public int UID { get; set; } - - [Key] - [StringLength(50)] - public string ParamName { get; set; } - - [Required] - [StringLength(50)] - public string ParamValue { get; set; } - - public int State { get; set; } - - [StringLength(500)] - public string Remark { get; set; } - } -} diff --git a/CK.SCP.Models/ScpEntity/TA_FACTORY.cs b/CK.SCP.Models/ScpEntity/TA_FACTORY.cs deleted file mode 100644 index f389670..0000000 --- a/CK.SCP.Models/ScpEntity/TA_FACTORY.cs +++ /dev/null @@ -1,34 +0,0 @@ -//------------------------------------------------------------------------------ -// <auto-generated> -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// </auto-generated> -//------------------------------------------------------------------------------ - -namespace CK.SCP.Models.ScpEntity -{ - using System; - using System.Collections.Generic; - - public partial class TA_FACTORY - { - public int UID { get; set; } - public string FactoryId { get; set; } - public string FactoryName { get; set; } - public string ErpSite { get; set; } - public string ErpDomain { get; set; } - public string Address { get; set; } - public string ZipCode { get; set; } - public int State { get; set; } - public string Remark { get; set; } - public System.DateTime CreateTime { get; set; } - public string CreateUser { get; set; } - public Nullable<System.DateTime> UpdateTime { get; set; } - public string UpdateUser { get; set; } - public string UpdateInfo { get; set; } - public bool IsDeleted { get; set; } - public System.Guid GUID { get; set; } - } -} diff --git a/CK.SCP.Models/ScpEntity/TA_Info.cs b/CK.SCP.Models/ScpEntity/TA_Info.cs deleted file mode 100644 index c4d3c63..0000000 --- a/CK.SCP.Models/ScpEntity/TA_Info.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace CK.SCP.Models.ScpEntity -{ - public class TA_Info - { - [Key] - [DatabaseGenerated(DatabaseGeneratedOption.Identity)] - public int ID { get; set; } - - - [StringLength(50)] - public string FactoryCode { get; set; } - - [StringLength(50)] - public string InfoType { get; set; } - - - [StringLength(50)] - public string SupplierCode { get; set; } - - [StringLength(50)] - public string Title { get; set; } - - - public string Content { get; set; } - - public DateTime AddTime { get; set; } - - [StringLength(500)] - public string UserName { get; set; } - - [StringLength(50)] - public string Enable { get; set; } - - public DateTime ReadTime { get; set; } - } -} diff --git a/CK.SCP.Models/ScpEntity/TA_LANGUAGE.cs b/CK.SCP.Models/ScpEntity/TA_LANGUAGE.cs deleted file mode 100644 index 4d63e94..0000000 --- a/CK.SCP.Models/ScpEntity/TA_LANGUAGE.cs +++ /dev/null @@ -1,21 +0,0 @@ - - -namespace CK.SCP.Models.ScpEntity -{ - using System; - using System.Collections.Generic; - - public partial class TA_LANGUAGE - { - public int UID { get; set; } - public string GUID { get; set; } - public string CH { get; set; } - public string EN { get; set; } - public string RU { get; set; } - public string DE { get; set; } - public string FR { get; set; } - public string EL { get; set; } - public string AR { get; set; } - public string JP { get; set; } - } -} diff --git a/CK.SCP.Models/ScpEntity/TA_PART.cs b/CK.SCP.Models/ScpEntity/TA_PART.cs deleted file mode 100644 index 4b4c81f..0000000 --- a/CK.SCP.Models/ScpEntity/TA_PART.cs +++ /dev/null @@ -1,55 +0,0 @@ -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace CK.SCP.Models.ScpEntity -{ - public partial class TA_PART - { - [DatabaseGenerated(DatabaseGeneratedOption.Identity)] - public long UID { get; set; } - - [Key] - [StringLength(50)] - public string PartCode { get; set; } - - [Required] - [StringLength(50)] - public string ErpPartCode { get; set; } - -// [Required] - public string PartDesc1 { get; set; } - -// [Required] - public string PartDesc2 { get; set; } - -// [Required] - [StringLength(50)] - public string ProjectId { get; set; } - - [Required] - [StringLength(50)] - public string Unit { get; set; } - -// [Required] - [StringLength(50)] - public string PartGroup { get; set; } - - [Required] - [StringLength(10)] - public string State { get; set; } - - [StringLength(100)] - public string Configuration { get; set; } - - public int ValidityDays { get; set; } - - [StringLength(50)] - public string ReceivePort { get; set; } - - [StringLength(50)] - public string PalletSize { get; set; } - - [StringLength(500)] - public string Remark { get; set; } - } -} diff --git a/CK.SCP.Models/ScpEntity/TA_Part_User.cs b/CK.SCP.Models/ScpEntity/TA_Part_User.cs deleted file mode 100644 index f9f40c4..0000000 --- a/CK.SCP.Models/ScpEntity/TA_Part_User.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using System.Data.Entity; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace CK.SCP.Models.ScpEntity -{ - public class TA_Part_User - { - [Key] - [DatabaseGenerated(DatabaseGeneratedOption.Computed)] - public int UID { get; set; } - - [StringLength(50)] - public string PartCode { get; set; } - - [StringLength(50)] - public string UserName { get; set; } - - [NotMapped] - [DisplayName("零件名称")] - public string PartName => ScpCache.GetPartDesc1(PartCode); - } -} diff --git a/CK.SCP.Models/ScpEntity/TA_VENDER.cs b/CK.SCP.Models/ScpEntity/TA_VENDER.cs deleted file mode 100644 index 434f64a..0000000 --- a/CK.SCP.Models/ScpEntity/TA_VENDER.cs +++ /dev/null @@ -1,62 +0,0 @@ -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace CK.SCP.Models.ScpEntity -{ - public class TA_VENDER - { - [DatabaseGenerated(DatabaseGeneratedOption.Identity)] - public int UID { get; set; } - - [Key] - [StringLength(50)] - public string VendId { get; set; } - - [Required] - [StringLength(50)] - public string VendName { get; set; } - - [Required] - [StringLength(2)] - public string VendAbbCode { get; set; } - - [StringLength(50)] - public string VendType { get; set; } - - [StringLength(50)] - public string Country { get; set; } - - [StringLength(50)] - public string City { get; set; } - - [StringLength(50)] - public string Currency { get; set; } - - [StringLength(200)] - public string Address { get; set; } - - [StringLength(50)] - public string ZipCode { get; set; } - - [StringLength(50)] - public string Contacter { get; set; } - - [StringLength(50)] - public string Phone { get; set; } - - [StringLength(50)] - public string Fax { get; set; } - - [StringLength(50)] - public string Email { get; set; } - - public int State { get; set; } - - [StringLength(500)] - public string Remark { get; set; } - - - public decimal? Tax { get; set; } - } -} diff --git a/CK.SCP.Models/ScpEntity/TA_VEND_PART.cs b/CK.SCP.Models/ScpEntity/TA_VEND_PART.cs deleted file mode 100644 index 2459c70..0000000 --- a/CK.SCP.Models/ScpEntity/TA_VEND_PART.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace CK.SCP.Models.ScpEntity -{ - public partial class TA_VEND_PART - { - [DatabaseGenerated(DatabaseGeneratedOption.Identity)] - public long UID { get; set; } - - [Key] - [Column(Order = 0)] - [StringLength(50)] - public string VendId { get; set; } - - [Key] - [Column(Order = 1)] - [StringLength(50)] - public string PartCode { get; set; } - - [Key] - [Column(Order = 2)] - [StringLength(50)] - public string VendPartCode { get; set; } - - public decimal VendPackQty { get; set; } - - [StringLength(50)] - public string PoUnit { get; set; } - - public int State { get; set; } - - [StringLength(500)] - public string Remark { get; set; } - - [NotMapped] - [DisplayName("Ӧ")] - public string VendName => ScpCache.GetVendName(VendId); - - [NotMapped] - [DisplayName("")] - public string PartName => ScpCache.GetVendName(PartCode); - } -} diff --git a/CK.SCP.Models/ScpEntity/TA_VEND_USER.cs b/CK.SCP.Models/ScpEntity/TA_VEND_USER.cs deleted file mode 100644 index ad2aa1e..0000000 --- a/CK.SCP.Models/ScpEntity/TA_VEND_USER.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace CK.SCP.Models.ScpEntity -{ - public class TA_VEND_USER - { - [Key] - [DatabaseGenerated(DatabaseGeneratedOption.Identity)] - public int UID { get; set; } - - [StringLength(50)] - public string VendId { get; set; } - - [StringLength(50)] - public string UserName { get; set; } - - [NotMapped] - [DisplayName("供应商名称")] - public string VendName => ScpCache.GetVendName(VendId); - } -} diff --git a/CK.SCP.Models/ScpEntity/TB_ASK.cs b/CK.SCP.Models/ScpEntity/TB_ASK.cs deleted file mode 100644 index 5903446..0000000 --- a/CK.SCP.Models/ScpEntity/TB_ASK.cs +++ /dev/null @@ -1,32 +0,0 @@ -//------------------------------------------------------------------------------ -// <auto-generated> -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// </auto-generated> -//------------------------------------------------------------------------------ - -namespace CK.SCP.Models.ScpEntity -{ - using System; - using System.Collections.Generic; - - public partial class TB_ASK - { - public int UID { get; set; } - public string AskBillNum { get; set; } - public string PoBillNum { get; set; } - public string VendId { get; set; } - public string Site { get; set; } - public int State { get; set; } - public string Remark { get; set; } - public System.DateTime CreateTime { get; set; } - public string CreateUser { get; set; } - public Nullable<System.DateTime> UpdateTime { get; set; } - public string UpdateUser { get; set; } - public string UpdateInfo { get; set; } - public bool IsDeleted { get; set; } - public System.Guid GUID { get; set; } - } -} diff --git a/CK.SCP.Models/ScpEntity/TB_ASK_DETAIL.cs b/CK.SCP.Models/ScpEntity/TB_ASK_DETAIL.cs deleted file mode 100644 index 7e3fdb5..0000000 --- a/CK.SCP.Models/ScpEntity/TB_ASK_DETAIL.cs +++ /dev/null @@ -1,42 +0,0 @@ -//------------------------------------------------------------------------------ -// <auto-generated> -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// </auto-generated> -//------------------------------------------------------------------------------ - -namespace CK.SCP.Models.ScpEntity -{ - using System; - using System.Collections.Generic; - - public partial class TB_ASK_DETAIL - { - public int UID { get; set; } - public string AskBillNum { get; set; } - public string PoBillNum { get; set; } - public int PoLine { get; set; } - public string PartCode { get; set; } - public decimal AskQty { get; set; } - public decimal ShippedQty { get; set; } - public decimal ReceivedQty { get; set; } - public Nullable<System.DateTime> BeginTime { get; set; } - public Nullable<System.DateTime> EndTime { get; set; } - public string PoUnit { get; set; } - public string LocUnit { get; set; } - public decimal PackQty { get; set; } - public decimal UnConv { get; set; } - public string DockCode { get; set; } - public int State { get; set; } - public string Remark { get; set; } - public System.DateTime CreateTime { get; set; } - public string CreateUser { get; set; } - public Nullable<System.DateTime> UpdateTime { get; set; } - public string UpdateUser { get; set; } - public string UpdateInfo { get; set; } - public bool IsDeleted { get; set; } - public System.Guid GUID { get; set; } - } -} diff --git a/CK.SCP.Models/ScpEntity/TB_ASN.cs b/CK.SCP.Models/ScpEntity/TB_ASN.cs deleted file mode 100644 index 41c3172..0000000 --- a/CK.SCP.Models/ScpEntity/TB_ASN.cs +++ /dev/null @@ -1,41 +0,0 @@ -//------------------------------------------------------------------------------ -// <auto-generated> -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// </auto-generated> -//------------------------------------------------------------------------------ - -namespace CK.SCP.Models.ScpEntity -{ - using System; - using System.Collections.Generic; - - using System.ComponentModel.DataAnnotations; - using System.ComponentModel.DataAnnotations.Schema; - - - public partial class TB_ASN - { - public int UID { get; set; } - public string AsnBillNum { get; set; } - public string AskBillNum { get; set; } - public string PoBillNum { get; set; } - public string VendId { get; set; } - public string Site { get; set; } - public int State { get; set; } - public string Remark { get; set; } - public System.DateTime CreateTime { get; set; } - public string CreateUser { get; set; } - public Nullable<System.DateTime> UpdateTime { get; set; } - public string UpdateUser { get; set; } - public string UpdateInfo { get; set; } - public Nullable<System.DateTime> ShipTime { get; set; } - public string ShipUser { get; set; } - public Nullable<System.DateTime> ReceiveTime { get; set; } - public string ReceiveUser { get; set; } - public bool IsDeleted { get; set; } - public System.Guid GUID { get; set; } - } -} diff --git a/CK.SCP.Models/ScpEntity/TB_ASN_DETAIL.cs b/CK.SCP.Models/ScpEntity/TB_ASN_DETAIL.cs deleted file mode 100644 index d1da646..0000000 --- a/CK.SCP.Models/ScpEntity/TB_ASN_DETAIL.cs +++ /dev/null @@ -1,41 +0,0 @@ -//------------------------------------------------------------------------------ -// <auto-generated> -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// </auto-generated> -//------------------------------------------------------------------------------ - -namespace CK.SCP.Models.ScpEntity -{ - using System; - using System.Collections.Generic; - - public partial class TB_ASN_DETAIL - { - public int UID { get; set; } - public string AsnBillNum { get; set; } - public string PoBillNum { get; set; } - public int PoLine { get; set; } - public string PartCode { get; set; } - public string Batch { get; set; } - public Nullable<System.DateTime> ProduceDate { get; set; } - public string VendBatch { get; set; } - public decimal Qty { get; set; } - public string PoUnit { get; set; } - public string LocUnit { get; set; } - public decimal PackQty { get; set; } - public decimal UnConv { get; set; } - public string DockCode { get; set; } - public Nullable<int> State { get; set; } - public string Remark { get; set; } - public System.DateTime CreateTime { get; set; } - public string CreateUser { get; set; } - public Nullable<System.DateTime> UpdateTime { get; set; } - public string UpdateUser { get; set; } - public string UpdateInfo { get; set; } - public bool IsDeleted { get; set; } - public System.Guid GUID { get; set; } - } -} diff --git a/CK.SCP.Models/ScpEntity/TB_INVOICE.cs b/CK.SCP.Models/ScpEntity/TB_INVOICE.cs deleted file mode 100644 index c3bee9d..0000000 --- a/CK.SCP.Models/ScpEntity/TB_INVOICE.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace CK.SCP.Models.ScpEntity -{ - public partial class TB_INVOICE - { - [DatabaseGenerated(DatabaseGeneratedOption.Identity)] - public int UID { get; set; } - - [Key] - [StringLength(50)] - public string BillNum { get; set; } - - public DateTime BillTime { get; set; } - - [StringLength(50)] - public string InvoiceNum { get; set; } - - [StringLength(50)] - public string ExpressNum { get; set; } - - - [StringLength(50)] - public string VendId { get; set; } - - - [StringLength(50)] - public string OperName { get; set; } - - public int State { get; set; } - - [StringLength(50)] - public string Remark { get; set; } - public string Tax { get; set; } - } -} diff --git a/CK.SCP.Models/ScpEntity/TB_INVOICE_DETAIL.cs b/CK.SCP.Models/ScpEntity/TB_INVOICE_DETAIL.cs deleted file mode 100644 index b1c44fb..0000000 --- a/CK.SCP.Models/ScpEntity/TB_INVOICE_DETAIL.cs +++ /dev/null @@ -1,79 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace CK.SCP.Models.ScpEntity -{ - public partial class TB_INVOICE_DETAIL - { - [DatabaseGenerated(DatabaseGeneratedOption.Identity)] - public int UID { get; set; } - - [Key] - [Column(Order = 0)] - [StringLength(50)] - public string BillNum { get; set; } - - [Key] - [Column(Order = 1)] - [StringLength(50)] - public string PoBillNum { get; set; } - - [Key] - [Column(Order = 2)] - [DatabaseGenerated(DatabaseGeneratedOption.None)] - public int PoLineNum { get; set; } - - [Key] - [Column(Order = 3)] - [StringLength(50)] - public string AsnBillNUm { get; set; } - - [Key] - [Column(Order = 4)] - [StringLength(50)] - public string PartCode { get; set; } - - [Key] - [Column(Order = 5)] - [StringLength(50)] - public string Batch { get; set; } - - [Column(TypeName = "date")] - public DateTime ProduceDate { get; set; } - - [StringLength(50)] - public string VendBatch { get; set; } - - [Column(TypeName = "money")] - public decimal Qty { get; set; } - - [StringLength(50)] - public string PoUnit { get; set; } - - [StringLength(50)] - public string LocUnit { get; set; } - - [Column(TypeName = "money")] - public decimal Price { get; set; } - - public decimal Tax { get; set; } - - public decimal TaxAmt { get; set; } - - [StringLength(50)] - public string Currency { get; set; } - - [Column(TypeName = "money")] - public decimal PackQty { get; set; } - - public int State { get; set; } - - [StringLength(50)] - public string ReceiveBillNum { get; set; } - - [StringLength(50)] - public string QadBillNo { get; set; } - - } -} diff --git a/CK.SCP.Models/ScpEntity/TB_PLAN.cs b/CK.SCP.Models/ScpEntity/TB_PLAN.cs deleted file mode 100644 index 403221e..0000000 --- a/CK.SCP.Models/ScpEntity/TB_PLAN.cs +++ /dev/null @@ -1,39 +0,0 @@ -//------------------------------------------------------------------------------ -// <auto-generated> -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// </auto-generated> -//------------------------------------------------------------------------------ - -namespace CK.SCP.Models.ScpEntity -{ - using System; - using System.Collections.Generic; - - using System.ComponentModel.DataAnnotations; - using System.ComponentModel.DataAnnotations.Schema; - - - public partial class TB_PLAN - { - public int UID { get; set; } - public string PlanId { get; set; } - public string PlanName { get; set; } - public string ErpPlanId { get; set; } - public string Version { get; set; } - public string VendId { get; set; } - public string Site { get; set; } - public int PlanType { get; set; } - public int State { get; set; } - public string Remark { get; set; } - public System.DateTime CreateTime { get; set; } - public string CreateUser { get; set; } - public Nullable<System.DateTime> UpdateTime { get; set; } - public string UpdateUser { get; set; } - public string UpdateInfo { get; set; } - public bool IsDeleted { get; set; } - public System.Guid GUID { get; set; } - } -} diff --git a/CK.SCP.Models/ScpEntity/TB_PLAN_DETAIL.cs b/CK.SCP.Models/ScpEntity/TB_PLAN_DETAIL.cs deleted file mode 100644 index a7cb14b..0000000 --- a/CK.SCP.Models/ScpEntity/TB_PLAN_DETAIL.cs +++ /dev/null @@ -1,34 +0,0 @@ -//------------------------------------------------------------------------------ -// <auto-generated> -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// </auto-generated> -//------------------------------------------------------------------------------ - -namespace CK.SCP.Models.ScpEntity -{ - using System; - using System.Collections.Generic; - - public partial class TB_PLAN_DETAIL - { - public int UID { get; set; } - public string PlanId { get; set; } - public string PlanPieriod { get; set; } - public System.DateTime BeginDate { get; set; } - public System.DateTime EndDate { get; set; } - public string PartCode { get; set; } - public decimal Qty { get; set; } - public int State { get; set; } - public string Remark { get; set; } - public System.DateTime CreateTime { get; set; } - public string CreateUser { get; set; } - public Nullable<System.DateTime> UpdateTime { get; set; } - public string UpdateUser { get; set; } - public string UpdateInfo { get; set; } - public bool IsDeleted { get; set; } - public System.Guid GUID { get; set; } - } -} diff --git a/CK.SCP.Models/ScpEntity/TB_PO.cs b/CK.SCP.Models/ScpEntity/TB_PO.cs deleted file mode 100644 index cdad160..0000000 --- a/CK.SCP.Models/ScpEntity/TB_PO.cs +++ /dev/null @@ -1,41 +0,0 @@ -//------------------------------------------------------------------------------ -// <auto-generated> -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// </auto-generated> -//------------------------------------------------------------------------------ - -namespace CK.SCP.Models.ScpEntity -{ - using System; - using System.Collections.Generic; - - using System.ComponentModel.DataAnnotations; - using System.ComponentModel.DataAnnotations.Schema; - - - public partial class TB_PO - { - - public int UID { get; set; } - public string PoBillNum { get; set; } - public string ErpBillNum { get; set; } - public string VendId { get; set; } - public Nullable<int> ModType { get; set; } - public string Contacter { get; set; } - public string Site { get; set; } - public string Buyer { get; set; } - public string BuyerPhone { get; set; } - public int State { get; set; } - public string Remark { get; set; } - public System.DateTime CreateTime { get; set; } - public string CreateUser { get; set; } - public Nullable<System.DateTime> UpdateTime { get; set; } - public string UpdateUser { get; set; } - public string UpdateInfo { get; set; } - public bool IsDeleted { get; set; } - public System.Guid GUID { get; set; } - } -} diff --git a/CK.SCP.Models/ScpEntity/TB_PO_DETAIL.cs b/CK.SCP.Models/ScpEntity/TB_PO_DETAIL.cs deleted file mode 100644 index 0b3b126..0000000 --- a/CK.SCP.Models/ScpEntity/TB_PO_DETAIL.cs +++ /dev/null @@ -1,48 +0,0 @@ -//------------------------------------------------------------------------------ -// <auto-generated> -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// </auto-generated> -//------------------------------------------------------------------------------ - -namespace CK.SCP.Models.ScpEntity -{ - using System; - using System.Collections.Generic; - - using System.ComponentModel.DataAnnotations; - using System.ComponentModel.DataAnnotations.Schema; - - - public partial class TB_PO_DETAIL - { - public int UID { get; set; } - public string PoBillNum { get; set; } - public int PoLine { get; set; } - public string PartCode { get; set; } - public decimal PlanQty { get; set; } - public decimal ShippedQty { get; set; } - public decimal ReceivedQty { get; set; } - public string RejectQty { get; set; } - public Nullable<System.DateTime> BeginTime { get; set; } - public Nullable<System.DateTime> EndTime { get; set; } - public string PoUnit { get; set; } - public string LocUnit { get; set; } - public decimal Price { get; set; } - public string Currency { get; set; } - public decimal PackQty { get; set; } - public decimal UnConv { get; set; } - public string DockCode { get; set; } - public int State { get; set; } - public string Remark { get; set; } - public System.DateTime CreateTime { get; set; } - public string CreateUser { get; set; } - public Nullable<System.DateTime> UpdateTime { get; set; } - public string UpdateUser { get; set; } - public string UpdateInfo { get; set; } - public bool IsDeleted { get; set; } - public System.Guid GUID { get; set; } - } -} diff --git a/CK.SCP.Models/ScpEntity/TB_PlanMonth.cs b/CK.SCP.Models/ScpEntity/TB_PlanMonth.cs deleted file mode 100644 index e3692c9..0000000 --- a/CK.SCP.Models/ScpEntity/TB_PlanMonth.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace CK.SCP.Models.ScpEntity -{ - public class TB_PlanMonth - { - [Key] - [DatabaseGenerated(DatabaseGeneratedOption.Identity)] - public int ID { get; set; } - - [StringLength(50)] - public string Code { get; set; } - - [StringLength(50)] - public string SupplierCode { get; set; } - - public DateTime AddTime { get; set; } - - public DateTime? SendTime { get; set; } - - - [StringLength(50)] - public string Name { get; set; } - - [StringLength(50)] - public string Ver { get; set; } - - public string FileName { get; set; } - - public string UserName { get; set; } - - public string IsSend { get; set; } - - } -} diff --git a/CK.SCP.Models/ScpEntity/TB_PublicData.cs b/CK.SCP.Models/ScpEntity/TB_PublicData.cs deleted file mode 100644 index d77945f..0000000 --- a/CK.SCP.Models/ScpEntity/TB_PublicData.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace CK.SCP.Models.ScpEntity -{ - public class TB_PublicData - { - [Key] - [DatabaseGenerated(DatabaseGeneratedOption.Identity)] - public int ID { get; set; } - - - [StringLength(50)] - public string Code { get; set; } - - [StringLength(50)] - public string Name { get; set; } - - - [StringLength(50)] - public string Ver { get; set; } - - [StringLength(50)] - public string FileName { get; set; } - - public DateTime AddTime { get; set; } - - [StringLength(500)] - public string UserName { get; set; } - - [NotMapped] - public string UploadUser { get; set; } - - - } -} diff --git a/CK.SCP.Models/ScpEntity/TB_QadOrder.cs b/CK.SCP.Models/ScpEntity/TB_QadOrder.cs deleted file mode 100644 index 9831af3..0000000 --- a/CK.SCP.Models/ScpEntity/TB_QadOrder.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace CK.SCP.Models.ScpEntity -{ - public class TB_QadOrder - { - [Key] - public decimal ID { get; set; } - - [StringLength(50)] - public string BillNo { get; set; } - - [StringLength(50)] - public string SupplierCode { get; set; } - - public DateTime StartDate { get; set; } - - public DateTime EndDate { get; set; } - - [NotMapped] - [StringLength(50)] - public string Address { get; set; } - - [NotMapped] - [StringLength(50)] - public string ProductCode { get; set; } - - [NotMapped] - public decimal Qty { get; set; } - - [NotMapped] - [StringLength(50)] - public string PartName { get; set; } - - [NotMapped] - [StringLength(50)] - public string VendName{ get; set; } - } -} diff --git a/CK.SCP.Models/ScpEntity/TB_QadOrderDetail.cs b/CK.SCP.Models/ScpEntity/TB_QadOrderDetail.cs deleted file mode 100644 index e1f1df9..0000000 --- a/CK.SCP.Models/ScpEntity/TB_QadOrderDetail.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System.ComponentModel.DataAnnotations; - -namespace CK.SCP.Models.ScpEntity -{ - public class TB_QadOrderDetail - { - [Key] - public decimal ID { get; set; } - - [StringLength(50)] - public string BillNo { get; set; } - - [StringLength(50)] - public string ProductCode { get; set; } - - public decimal Price { get; set; } - - public decimal Qty { get; set; } - - public decimal Qtyed { get; set; } - } -} diff --git a/CK.SCP.Models/ScpEntity/TB_RECEIVE.cs b/CK.SCP.Models/ScpEntity/TB_RECEIVE.cs deleted file mode 100644 index ecd5474..0000000 --- a/CK.SCP.Models/ScpEntity/TB_RECEIVE.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace CK.SCP.Models.ScpEntity -{ - public partial class TB_RECEIVE - { - [DatabaseGenerated(DatabaseGeneratedOption.Identity)] - public int UID { get; set; } - - [Key] - [StringLength(50)] - public string BillNum { get; set; } - - public int BillType { get; set; } - - public DateTime BillTime { get; set; } - - [Required] - [StringLength(50)] - public string PoBillNum { get; set; } - - [Required] - [StringLength(50)] - public string AsnBillNum { get; set; } - - [Required] - [StringLength(50)] - public string VendId { get; set; } - - [Required] - [StringLength(50)] - public string OperName { get; set; } - - public DateTime ShipTime { get; set; } - - public DateTime ReceiveTime { get; set; } - - public int State { get; set; } - - [StringLength(50)] - public string Remark { get; set; } - - [StringLength(50)] - public string QadBillNo { get; set; } - - [DisplayName("Ӧ")] - public string VendName => ScpCache.GetVendName(VendId); - - } -} diff --git a/CK.SCP.Models/ScpEntity/TB_RECEIVE_DETAIL.cs b/CK.SCP.Models/ScpEntity/TB_RECEIVE_DETAIL.cs deleted file mode 100644 index e39f317..0000000 --- a/CK.SCP.Models/ScpEntity/TB_RECEIVE_DETAIL.cs +++ /dev/null @@ -1,76 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace CK.SCP.Models.ScpEntity -{ - public partial class TB_RECEIVE_DETAIL - { - public string UID { get; set; } - - [Key] - [Column(Order = 0)] - [StringLength(50)] - public string BillNum { get; set; } - - // [Key] - // [Column(Order = 1)] - // [StringLength(50)] - // public string PoBillNum { get; set; } - [NotMapped] - public string PoBillNum => ScpCache.GetReceivePoBillNum(BillNum); - - [Key] - [Column(Order = 1)] - [DatabaseGenerated(DatabaseGeneratedOption.None)] - public int PoLineNum { get; set; } - - // [Key] - // [Column(Order = 3)] - // [StringLength(50)] - // public string AsnBillNum { get; set; } - [NotMapped] - public string AsnBillNum => ScpCache.GetReceiveAsnBillNum(BillNum); - - [Key] - [Column(Order = 2)] - [StringLength(50)] - public string PartCode { get; set; } - - [Key] - [Column(Order = 5)] - [StringLength(50)] - public string Batch { get; set; } - - [Column(TypeName = "date")] - public DateTime ProduceDate { get; set; } - - [StringLength(50)] - public string VendBatch { get; set; } - - - public decimal BillQty { get; set; } - - - public decimal ReceivedQty { get; set; } - - [StringLength(50)] - public string PoUnit { get; set; } - - [StringLength(50)] - public string LocUnit { get; set; } - - [Column(TypeName = "money")] - public decimal Price { get; set; } - - [StringLength(50)] - public string Currency { get; set; } - - public Int32 Qty => Convert.ToInt32(ReceivedQty) - Convert.ToInt32(BillQty); - - public int State { get; set; } - - [StringLength(50)] - public string Remark { get; set; } - } -} diff --git a/CK.SCP.Models/ScpEntity/TB_REJECT.cs b/CK.SCP.Models/ScpEntity/TB_REJECT.cs deleted file mode 100644 index 0e7b5c4..0000000 --- a/CK.SCP.Models/ScpEntity/TB_REJECT.cs +++ /dev/null @@ -1,31 +0,0 @@ -//------------------------------------------------------------------------------ -// <auto-generated> -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// </auto-generated> -//------------------------------------------------------------------------------ - -namespace CK.SCP.Models.ScpEntity -{ - using System; - using System.Collections.Generic; - - public partial class TB_REJECT - { - public int UID { get; set; } - public string RjctBillNum { get; set; } - public string PoBillNum { get; set; } - public string AsnBillNum { get; set; } - public string Site { get; set; } - public string VendId { get; set; } - public System.DateTime ShipTime { get; set; } - public int State { get; set; } - public string Remark { get; set; } - public System.DateTime CreateTime { get; set; } - public string CreateUser { get; set; } - public bool IsDeleted { get; set; } - public System.Guid GUID { get; set; } - } -} diff --git a/CK.SCP.Models/ScpEntity/TB_REJECT_DETAIL.cs b/CK.SCP.Models/ScpEntity/TB_REJECT_DETAIL.cs deleted file mode 100644 index d29c71e..0000000 --- a/CK.SCP.Models/ScpEntity/TB_REJECT_DETAIL.cs +++ /dev/null @@ -1,31 +0,0 @@ -//------------------------------------------------------------------------------ -// <auto-generated> -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// </auto-generated> -//------------------------------------------------------------------------------ - -namespace CK.SCP.Models.ScpEntity -{ - using System; - using System.Collections.Generic; - - public partial class TB_REJECT_DETAIL - { - public int UID { get; set; } - public string RjctBillNum { get; set; } - public string PoBillNum { get; set; } - public int PoLine { get; set; } - public string PartCode { get; set; } - public string Batch { get; set; } - public decimal Qty { get; set; } - public int State { get; set; } - public string Remark { get; set; } - public System.DateTime CreateTime { get; set; } - public string CreateUser { get; set; } - public bool IsDeleted { get; set; } - public System.Guid GUID { get; set; } - } -} diff --git a/CK.SCP.Models/ScpEntity/TB_RETURN.cs b/CK.SCP.Models/ScpEntity/TB_RETURN.cs deleted file mode 100644 index aff4448..0000000 --- a/CK.SCP.Models/ScpEntity/TB_RETURN.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace CK.SCP.Models.ScpEntity -{ - public partial class TB_RETURN - { - [DatabaseGenerated(DatabaseGeneratedOption.Identity)] - public int UID { get; set; } - - [Key] - [StringLength(50)] - public string BillNum { get; set; } - - public int BillType { get; set; } - - public DateTime BillTime { get; set; } - - [Required] - [StringLength(50)] - public string PoBillNum { get; set; } - - [Required] - [StringLength(50)] - public string AsnBillNum { get; set; } - - [Required] - [StringLength(50)] - public string VendId { get; set; } - - [Required] - [StringLength(50)] - public string OperName { get; set; } - - public DateTime ShipTime { get; set; } - - public DateTime ReceiveTime { get; set; } - - public int State { get; set; } - - [StringLength(50)] - public string Remark { get; set; } - } -} diff --git a/CK.SCP.Models/ScpEntity/TB_RETURN_DETAIL.cs b/CK.SCP.Models/ScpEntity/TB_RETURN_DETAIL.cs deleted file mode 100644 index 225533d..0000000 --- a/CK.SCP.Models/ScpEntity/TB_RETURN_DETAIL.cs +++ /dev/null @@ -1,71 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace CK.SCP.Models.ScpEntity -{ - public partial class TB_RETURN_DETAIL - { - [DatabaseGenerated(DatabaseGeneratedOption.Identity)] - public int UID { get; set; } - - [Key] - [Column(Order = 0)] - [StringLength(50)] - public string BillNum { get; set; } - - [Key] - [Column(Order = 1)] - [StringLength(50)] - public string PoBillNum { get; set; } - - [Key] - [Column(Order = 2)] - [DatabaseGenerated(DatabaseGeneratedOption.None)] - public int PoLineNum { get; set; } - - [Key] - [Column(Order = 3)] - [StringLength(50)] - public string AsnBillNUm { get; set; } - - [Key] - [Column(Order = 4)] - [StringLength(50)] - public string PartCode { get; set; } - - [Key] - [Column(Order = 5)] - [StringLength(50)] - public string Batch { get; set; } - - [Column(TypeName = "date")] - public DateTime ProduceDate { get; set; } - - [StringLength(50)] - public string VendBatch { get; set; } - - [Column(TypeName = "money")] - public decimal BillQty { get; set; } - - [Column(TypeName = "money")] - public decimal ReceivedQty { get; set; } - - [StringLength(50)] - public string PoUnit { get; set; } - - [StringLength(50)] - public string LocUnit { get; set; } - - [Column(TypeName = "money")] - public decimal Price { get; set; } - - [StringLength(50)] - public string Currency { get; set; } - - [Column(TypeName = "money")] - public decimal PackQty { get; set; } - - public int State { get; set; } - } -} diff --git a/CK.SCP.Models/ScpEntity/TF_ASN.cs b/CK.SCP.Models/ScpEntity/TF_ASN.cs deleted file mode 100644 index cb7ce34..0000000 --- a/CK.SCP.Models/ScpEntity/TF_ASN.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace CK.SCP.Models.ScpEntity -{ - public partial class TF_ASN - { - [DatabaseGenerated(DatabaseGeneratedOption.Identity)] - public int UID { get; set; } - - [Key] - [StringLength(50)] - public string BillNum { get; set; } - - public DateTime BillTime { get; set; } - - [Required] - [StringLength(50)] - public string PoBillNum { get; set; } - - [Required] - [StringLength(50)] - public string VendId { get; set; } - - - - [Required] - [StringLength(50)] - public string OperName { get; set; } - - public DateTime ShipTime { get; set; } - - public int State { get; set; } - - [StringLength(50)] - public string Remark { get; set; } - - public DateTime? ReceiveTime { get; set; } - - [StringLength(50)] - public string DeliveryAddress { get; set; } - - // [NotMapped] - // [DisplayName("Ӧ̱")] - // public string VendID => ScpCache.GetVendName(OperName); - } -} diff --git a/CK.SCP.Models/ScpEntity/TF_ASN_DETAIL.cs b/CK.SCP.Models/ScpEntity/TF_ASN_DETAIL.cs deleted file mode 100644 index f2a49b5..0000000 --- a/CK.SCP.Models/ScpEntity/TF_ASN_DETAIL.cs +++ /dev/null @@ -1,62 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace CK.SCP.Models.ScpEntity -{ - public partial class TF_ASN_DETAIL - { - [DatabaseGenerated(DatabaseGeneratedOption.Identity)] - public int UID { get; set; } - - [Key] - [Column(Order = 0)] - [StringLength(50)] - public string BillNum { get; set; } - - [Key] - [Column(Order = 1)] - [StringLength(50)] - public string PoBillNum { get; set; } - - [Key] - [Column(Order = 2)] - [DatabaseGenerated(DatabaseGeneratedOption.None)] - public int PoLineNum { get; set; } - - [Key] - [Column(Order = 3)] - [StringLength(50)] - public string PartCode { get; set; } - - [StringLength(50)] - public string Batch { get; set; } - - [Column(TypeName = "date")] - public DateTime ProduceDate { get; set; } - - [StringLength(50)] - public string VendBatch { get; set; } - - [Column(TypeName = "money")] - public decimal BillQty { get; set; } - - [StringLength(50)] - public string PoUnit { get; set; } - - [StringLength(50)] - public string LocUnit { get; set; } - - [Column(TypeName = "money")] - public decimal Price { get; set; } - - [StringLength(50)] - public string Currency { get; set; } - - [Column(TypeName = "money")] - public decimal PackQty { get; set; } - - public int State { get; set; } - public decimal? UmConv { get; set; } - } -} diff --git a/CK.SCP.Models/ScpEntity/TF_PO.cs b/CK.SCP.Models/ScpEntity/TF_PO.cs deleted file mode 100644 index 0cc3d06..0000000 --- a/CK.SCP.Models/ScpEntity/TF_PO.cs +++ /dev/null @@ -1,35 +0,0 @@ -//------------------------------------------------------------------------------ -// <auto-generated> -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// </auto-generated> -//------------------------------------------------------------------------------ - -namespace CK.SCP.Models.ScpEntity -{ - using System; - using System.Collections.Generic; - using System.ComponentModel.DataAnnotations; - - public partial class TF_PO - { - public int UID { get; set; } - [Key] - public string BillNum { get; set; } - public string VendId { get; set; } - public string OperName { get; set; } - public System.DateTime BillTime { get; set; } - public string ModType { get; set; } - public System.DateTime DueDate { get; set; } - public string Contacter { get; set; } - public string ShipToSite { get; set; } - public string Buyer { get; set; } - public string BuyerPhone { get; set; } - public int State { get; set; } - public string Remark { get; set; } - public string ErpBillNum { get; set; } - public string MonthBillNo { get; set; } - } -} diff --git a/CK.SCP.Models/ScpEntity/TF_PO_DETAIL.cs b/CK.SCP.Models/ScpEntity/TF_PO_DETAIL.cs deleted file mode 100644 index cdd3855..0000000 --- a/CK.SCP.Models/ScpEntity/TF_PO_DETAIL.cs +++ /dev/null @@ -1,99 +0,0 @@ -using System; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace CK.SCP.Models.ScpEntity -{ - public partial class TF_PO_DETAIL - { - [DatabaseGenerated(DatabaseGeneratedOption.Identity)] - public int UID { get; set; } - - [Key] - [Column(Order = 0)] - [StringLength(50)] - public string BillNum { get; set; } - - public string ErpBillNum { get; set; } - - [Key] - [Column(Order = 1)] - [DatabaseGenerated(DatabaseGeneratedOption.None)] - public int ErpLineNum { get; set; } - - [Required] - [StringLength(50)] - public string PartCode { get; set; } - - [Column(TypeName = "money")] - public decimal BillQty { get; set; } - - [Column(TypeName = "money")] - public decimal ShippedQty { get; set; } - - [Column(TypeName = "money")] - public decimal ReceivedQty { get; set; } - - [Column(TypeName = "money")] - public decimal? RejectQty { get; set; } - - [StringLength(50)] - public string PoUnit { get; set; } - - [StringLength(50)] - public string LocUnit { get; set; } - - [Column(TypeName = "money")] - public decimal Price { get; set; } - - [StringLength(50)] - public string Currency { get; set; } - - [Column(TypeName = "date")] - public DateTime DueDate { get; set; } - - [Column(TypeName = "money")] - public decimal PackQty { get; set; } - - public int State { get; set; } - - [StringLength(200)] - public string Remark { get; set; } - - public decimal? UmConv { get; set; } - - [NotMapped] - [DisplayName("һ")] - public string PartDesc1 => ScpCache.GetPartDesc1(PartCode); - - - [NotMapped] - [DisplayName("")] - public decimal OpenQty => BillQty - ShippedQty; - - [NotMapped] - [DisplayName("")] - public decimal Qty1 => BillQty - ShippedQty; - [NotMapped] - [DisplayName("")] - public decimal Qty2 { get; set; } - - [NotMapped] - [DisplayName("")] - public decimal Qty3 { get; set; } - - - [NotMapped] - [DisplayName("")] - public string Batch1 { get; set; } - - [NotMapped] - [DisplayName("")] - public string Batch2 { get; set; } - - [NotMapped] - [DisplayName("")] - public string Batch3 { get; set; } - } -} diff --git a/CK.SCP.Models/ScpEntity/TL_BASEDATA.cs b/CK.SCP.Models/ScpEntity/TL_BASEDATA.cs deleted file mode 100644 index f8b8f15..0000000 --- a/CK.SCP.Models/ScpEntity/TL_BASEDATA.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; - -namespace CK.SCP.Models.ScpEntity -{ - public partial class TL_BASEDATA - { - [Key] - public long UID { get; set; } - - [Required] - [StringLength(80)] - public string OperName { get; set; } - - public DateTime LogTime { get; set; } - - [Required] - [StringLength(50)] - public string LogType { get; set; } - - [Required] - [StringLength(50)] - public string DataType { get; set; } - - [Required] - [StringLength(4000)] - public string OldValue { get; set; } - - [Required] - [StringLength(4000)] - public string NewValue { get; set; } - - [StringLength(500)] - public string Remark { get; set; } - } -} diff --git a/CK.SCP.Models/ScpEntity/TL_BILL.cs b/CK.SCP.Models/ScpEntity/TL_BILL.cs deleted file mode 100644 index dae515d..0000000 --- a/CK.SCP.Models/ScpEntity/TL_BILL.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; - -namespace CK.SCP.Models.ScpEntity -{ - public partial class TL_BILL - { - [Key] - public long UID { get; set; } - - [Required] - [StringLength(80)] - public string OperName { get; set; } - - public DateTime LogTime { get; set; } - - [Required] - [StringLength(50)] - public string LogType { get; set; } - - [Required] - [StringLength(50)] - public string BillNum { get; set; } - - public int BillType { get; set; } - - public string Message { get; set; } - } -} diff --git a/CK.SCP.Models/ScpEntity/TL_OPER.cs b/CK.SCP.Models/ScpEntity/TL_OPER.cs deleted file mode 100644 index 8aee705..0000000 --- a/CK.SCP.Models/ScpEntity/TL_OPER.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; - -namespace CK.SCP.Models.ScpEntity -{ - public partial class TL_OPER - { - [Key] - public long UID { get; set; } - - [Required] - [StringLength(80)] - public string OperCode { get; set; } - - [Required] - [StringLength(50)] - public string OperName { get; set; } - - public DateTime LogTime { get; set; } - - [Required] - [StringLength(50)] - public string LogType { get; set; } - - [Required] - [StringLength(200)] - public string LogSite { get; set; } - - public string Message { get; set; } - } -} diff --git a/CK.SCP.Models/ScpEntity/TL_USER.cs b/CK.SCP.Models/ScpEntity/TL_USER.cs deleted file mode 100644 index a87e8dc..0000000 --- a/CK.SCP.Models/ScpEntity/TL_USER.cs +++ /dev/null @@ -1,25 +0,0 @@ -//------------------------------------------------------------------------------ -// <auto-generated> -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// </auto-generated> -//------------------------------------------------------------------------------ - -namespace CK.SCP.Models.ScpEntity -{ - using System; - using System.Collections.Generic; - - public partial class TL_USER - { - public long UID { get; set; } - public string UserId { get; set; } - public string UserName { get; set; } - public System.DateTime LogTime { get; set; } - public string LogType { get; set; } - public string LogSite { get; set; } - public string Message { get; set; } - } -} diff --git a/CK.SCP.Models/ScpEntity/TS_BARCODE.cs b/CK.SCP.Models/ScpEntity/TS_BARCODE.cs deleted file mode 100644 index 00bed23..0000000 --- a/CK.SCP.Models/ScpEntity/TS_BARCODE.cs +++ /dev/null @@ -1,79 +0,0 @@ -using System; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace CK.SCP.Models.ScpEntity -{ - public partial class TS_BARCODE - { - [DatabaseGenerated(DatabaseGeneratedOption.Identity)] - public long UID { get; set; } - - [Key] - [StringLength(50)] - public string BarCode { get; set; } - - [Required] - [StringLength(500)] - public string FullBarCode { get; set; } - - [Required] - [StringLength(50)] - public string PartCode { get; set; } - - [StringLength(50)] - public string VendPartCode { get; set; } - - [Required] - [StringLength(50)] - public string Batch { get; set; } - - [Column(TypeName = "datetime2")] - public DateTime ProduceDate { get; set; } - - public int ManageType { get; set; } - - [Required] - [StringLength(50)] - public string SerialNum { get; set; } - - [Column(TypeName = "money")] - public decimal Qty { get; set; } - - public int BarCodeType { get; set; } - - [Required] - [StringLength(50)] - public string BillNum { get; set; } - - public int PoBillLine { get; set; } - - [StringLength(50)] - public string VendId { get; set; } - - [StringLength(50)] - public string VendBatch { get; set; } - - [Column(TypeName = "money")] - public decimal PackQty { get; set; } - - [Required] - [StringLength(50)] - public string CreateOper { get; set; } - - public DateTime CreateTime { get; set; } - - public int State { get; set; } - - [StringLength(500)] - public string Remark { get; set; } - - public string PoUnit { get; set; } - public string LocUnit { get; set; } - - [DisplayName("")] - public string PartName => ScpCache.GetPartDesc1(PartCode); - - } -} diff --git a/CK.SCP.Models/ScpEntity/TS_INFO.cs b/CK.SCP.Models/ScpEntity/TS_INFO.cs deleted file mode 100644 index 3c69658..0000000 --- a/CK.SCP.Models/ScpEntity/TS_INFO.cs +++ /dev/null @@ -1,34 +0,0 @@ -//------------------------------------------------------------------------------ -// <auto-generated> -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// </auto-generated> -//------------------------------------------------------------------------------ - -namespace CK.SCP.Models.ScpEntity -{ - using System; - using System.Collections.Generic; - - public partial class TS_INFO - { - public int UID { get; set; } - public string VendId { get; set; } - public string Site { get; set; } - public Nullable<int> InfoType { get; set; } - public string Title { get; set; } - public string Infomation { get; set; } - public string FileName { get; set; } - public Nullable<int> state { get; set; } - public string Remark { get; set; } - public System.DateTime CreateTime { get; set; } - public string CreateUser { get; set; } - public Nullable<System.DateTime> UpdateTIme { get; set; } - public string UpdateUser { get; set; } - public string UpdateInfo { get; set; } - public Nullable<bool> IsDeleted { get; set; } - public System.Guid GUID { get; set; } - } -} diff --git a/CK.SCP.Models/ScpEntity/TS_STOCK.cs b/CK.SCP.Models/ScpEntity/TS_STOCK.cs deleted file mode 100644 index afc03dd..0000000 --- a/CK.SCP.Models/ScpEntity/TS_STOCK.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace CK.SCP.Models.ScpEntity -{ - public partial class TS_STOCK - { - [DatabaseGenerated(DatabaseGeneratedOption.Identity)] - public long UID { get; set; } - - [Key] - [Column(Order = 0)] - [StringLength(50)] - public string BarCode { get; set; } - - [Key] - [Column(Order = 1)] - [StringLength(50)] - public string LocCode { get; set; } - - [Required] - [StringLength(50)] - public string PartCode { get; set; } - - [Required] - [StringLength(50)] - public string Batch { get; set; } - - [Key] - [Column(Order = 2)] - [DatabaseGenerated(DatabaseGeneratedOption.None)] - public int State { get; set; } - - [StringLength(50)] - public string VendId { get; set; } - - [Column(TypeName = "money")] - public decimal Qty { get; set; } - - [StringLength(50)] - public string VendBatch { get; set; } - - [Column(TypeName = "date")] - public DateTime ReceiveDate { get; set; } - - [Column(TypeName = "date")] - public DateTime ProduceDate { get; set; } - - [StringLength(500)] - public string Remark { get; set; } - } -} diff --git a/CK.SCP.Models/ScpEntity/TS_UNI_API.cs b/CK.SCP.Models/ScpEntity/TS_UNI_API.cs deleted file mode 100644 index 3b4c91f..0000000 --- a/CK.SCP.Models/ScpEntity/TS_UNI_API.cs +++ /dev/null @@ -1,124 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace CK.SCP.Models.ScpEntity -{ - public partial class TS_UNI_API - { - [Key] - [DatabaseGenerated(DatabaseGeneratedOption.Identity)] - public int UID { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string InterfaceType { get; set; } - - [StringLength(50)] - public string TableName { get; set; } - - public int? BillType { get; set; } - - public int? SubBillType { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string BillNum { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string PartCode { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string Batch { get; set; } - - public decimal Qty { get; set; } - - public int State { get; set; } - - [StringLength(50)] - public string CreateOper { get; set; } - - public DateTime CreateTime { get; set; } - - public DateTime PutTime { get; set; } - - [StringLength(50)] - public string VendId { get; set; } - - [StringLength(50)] - public string PoUnit { get; set; } - - [StringLength(50)] - public string LocUnit { get; set; } - - public DateTime ValidDate { get; set; } - - [StringLength(50)] - public string ErpBillNum { get; set; } - - public int ErpLineNum { get; set; } - - [StringLength(50)] - public string VendBatch { get; set; } - - [StringLength(50)] - public string SourceBillNum { get; set; } - - public decimal PackQty { get; set; } - public decimal Price { get; set; } - public string Barcode { get; set; } - public string Currency { get; set; } - public decimal UmConv { get; set; } - public string Attn { get; set; } - public string Buyer { get; set; } - public string BuyerPhone { get; set; } - public string ModType { get; set; } - public string Invoice { get; set; } - public decimal TaxAmt { get; set; } - public string Receiver { get; set; } - public decimal Tax { get; set; } - - - public TS_UNI_API_HIS ToHis() - { - return new TS_UNI_API_HIS - { - InterfaceType = InterfaceType, - TableName = TableName, - BillType = BillType, - SubBillType = SubBillType, - BillNum = BillNum, - PartCode = PartCode, - Batch = Batch, - Qty = Qty, - State = State, - CreateOper = CreateOper, - CreateTime = CreateTime, - PutTime = PutTime, - VendId = VendId, - PoUnit = PoUnit, - LocUnit = LocUnit, - ValidDate = ValidDate, - ErpBillNum = ErpBillNum, - ErpLineNum = ErpLineNum, - VendBatch = VendBatch, - SourceBillNum = SourceBillNum, - PackQty = PackQty, - Price = Price, - Barcode = Barcode, - Currency = Currency, - UmConv = UmConv, - Attn = Attn, - Buyer = Buyer, - BuyerPhone = BuyerPhone, - ModType = ModType, - Invoice = Invoice, - TaxAmt = TaxAmt, - Receiver = Receiver, - Taxt = Tax, - }; - } - } -} diff --git a/CK.SCP.Models/ScpEntity/TS_UNI_API_HIS.cs b/CK.SCP.Models/ScpEntity/TS_UNI_API_HIS.cs deleted file mode 100644 index 1d5a642..0000000 --- a/CK.SCP.Models/ScpEntity/TS_UNI_API_HIS.cs +++ /dev/null @@ -1,89 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace CK.SCP.Models.ScpEntity -{ - public partial class TS_UNI_API_HIS - { - [Key] - [DatabaseGenerated(DatabaseGeneratedOption.Identity)] - public int UID { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string InterfaceType { get; set; } - - [StringLength(50)] - public string TableName { get; set; } - - public int? BillType { get; set; } - - public int? SubBillType { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string BillNum { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string PartCode { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string Batch { get; set; } - - public decimal Qty { get; set; } - - public int State { get; set; } - - [StringLength(50)] - public string CreateOper { get; set; } - - public DateTime CreateTime { get; set; } - - public DateTime PutTime { get; set; } - - [StringLength(50)] - public string VendId { get; set; } - - [StringLength(50)] - public string PoUnit { get; set; } - - [StringLength(50)] - public string LocUnit { get; set; } - - public DateTime ValidDate { get; set; } - - [StringLength(50)] - public string ErpBillNum { get; set; } - - public int ErpLineNum { get; set; } - - [StringLength(50)] - public string EqptCode { get; set; } - - [StringLength(50)] - public string EqptType { get; set; } - - [StringLength(50)] - public string VendBatch { get; set; } - - [StringLength(50)] - public string SourceBillNum { get; set; } - - public decimal PackQty { get; set; } - public decimal Price { get; set; } - public string Barcode { get; set; } - public string Currency { get; set; } - public decimal UmConv { get; set; } - public string Attn { get; set; } - public string Buyer { get; set; } - public string BuyerPhone { get; set; } - public string ModType { get; set; } - public string Invoice { get; set; } - public decimal TaxAmt { get; set; } - public string Receiver { get; set; } - public decimal Taxt { get; set; } - } -} diff --git a/CK.SCP.Models/ScpEntity/TT_CURRENCY.cs b/CK.SCP.Models/ScpEntity/TT_CURRENCY.cs deleted file mode 100644 index 950097f..0000000 --- a/CK.SCP.Models/ScpEntity/TT_CURRENCY.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace CK.SCP.Models.ScpEntity -{ - public partial class TT_CURRENCY - { - [DatabaseGenerated(DatabaseGeneratedOption.Identity)] - public int UID { get; set; } - - [Key] - [StringLength(50)] - public string Currency { get; set; } - - [StringLength(50)] - public string CurrencyDesc { get; set; } - - [StringLength(50)] - public string Remark { get; set; } - } -} diff --git a/CK.SCP.Models/ScpEntity/TT_PROJECT.cs b/CK.SCP.Models/ScpEntity/TT_PROJECT.cs deleted file mode 100644 index 9a59851..0000000 --- a/CK.SCP.Models/ScpEntity/TT_PROJECT.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace CK.SCP.Models.ScpEntity -{ - public partial class TT_PROJECT - { - [DatabaseGenerated(DatabaseGeneratedOption.Identity)] - public int UID { get; set; } - - [Key] - [StringLength(50)] - public string ProjectId { get; set; } - - [Required] - [StringLength(50)] - public string ProjectName { get; set; } - - [StringLength(50)] - public string Remark { get; set; } - } -} diff --git a/CK.SCP.Models/ScpEntity/TT_UNIT.cs b/CK.SCP.Models/ScpEntity/TT_UNIT.cs deleted file mode 100644 index bfd8719..0000000 --- a/CK.SCP.Models/ScpEntity/TT_UNIT.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace CK.SCP.Models.ScpEntity -{ - public partial class TT_UNIT - { - [DatabaseGenerated(DatabaseGeneratedOption.Identity)] - public int UID { get; set; } - - [Key] - [StringLength(50)] - public string Unit { get; set; } - - [StringLength(200)] - public string Remak { get; set; } - } -} diff --git a/CK.SCP.Models/ScpEntity/V_BillInvoice.cs b/CK.SCP.Models/ScpEntity/V_BillInvoice.cs deleted file mode 100644 index f512da7..0000000 --- a/CK.SCP.Models/ScpEntity/V_BillInvoice.cs +++ /dev/null @@ -1,97 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace CK.SCP.Models.ScpEntity -{ - public class V_BillInvoice - { - [DatabaseGenerated(DatabaseGeneratedOption.Identity)] - public int UID { get; set; } - - [Key] - [StringLength(50)] - public string BillNum { get; set; } - - public DateTime BillTime { get; set; } - - [StringLength(50)] - public string InvoiceNum { get; set; } - - [StringLength(50)] - public string ExpressNum { get; set; } - - [Required] - [StringLength(50)] - public string VendId { get; set; } - -// [Required] -// [StringLength(50)] -// public string OperName { get; set; } - - public int State { get; set; } - - [StringLength(50)] - public string Remark { get; set; } - - - -// -// [StringLength(50)] -// public string PoBillNum { get; set; } -// -// -// [Column(Order = 2)] -// [DatabaseGenerated(DatabaseGeneratedOption.None)] -// public int PoLineNum { get; set; } -// -// [Column(Order = 3)] -// [StringLength(50)] -// public string AsnBillNum { get; set; } - -// [Column(Order = 4)] -// [StringLength(50)] -// public string PartCode { get; set; } - -// [Column(Order = 5)] -// [StringLength(50)] -// public string Batch { get; set; } - -// [Column(TypeName = "date")] -// public DateTime ProduceDate { get; set; } - -// [StringLength(50)] -// public string VendBatch { get; set; } - -// [Column(TypeName = "money")] -// public decimal Qty { get; set; } - -// [StringLength(50)] -// public string PoUnit { get; set; } -// -// [StringLength(50)] -// public string LocUnit { get; set; } - -// [Column(TypeName = "money")] -// public decimal Price { get; set; } -// -// [StringLength(50)] -// public string Currency { get; set; } - -// [Column(TypeName = "money")] -// public decimal PackQty { get; set; } - - - [Required] - [StringLength(50)] - public string VendName { get; set; } - - [NotMapped] - [Column(TypeName = "Decmail")] - public string Amount { get; set; } - - [NotMapped] - [Column(TypeName = "money")] - public string Total { get; set; } - } -} diff --git a/CK.SCP.Models/ScpEntity/V_BillInvoiceDetail.cs b/CK.SCP.Models/ScpEntity/V_BillInvoiceDetail.cs deleted file mode 100644 index e0534c4..0000000 --- a/CK.SCP.Models/ScpEntity/V_BillInvoiceDetail.cs +++ /dev/null @@ -1,119 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace CK.SCP.Models.ScpEntity -{ - public class V_BillInvoiceDetail - { - [DatabaseGenerated(DatabaseGeneratedOption.Identity)] - public int UID { get; set; } - - [Key] - [StringLength(50)] - public string BillNum { get; set; } - - [StringLength(50)] - public string PoBillNum { get; set; } - - [DatabaseGenerated(DatabaseGeneratedOption.None)] - public int PoLineNum { get; set; } - - [StringLength(50)] - public string AsnBillNUm { get; set; } - - [StringLength(50)] - public string PartCode { get; set; } - - [StringLength(50)] - public string Batch { get; set; } - - [Column(TypeName = "date")] - public DateTime ProduceDate { get; set; } - - [StringLength(50)] - public string VendBatch { get; set; } - - [Column(TypeName = "money")] - public decimal Qty { get; set; } - - [StringLength(50)] - public string PoUnit { get; set; } - - [StringLength(50)] - public string LocUnit { get; set; } - - [Column(TypeName = "money")] - public decimal Price { get; set; } - - [StringLength(50)] - public string Currency { get; set; } - - [Column(TypeName = "money")] - public decimal PackQty { get; set; } - - public int State { get; set; } - - - - - public DateTime BillTime { get; set; } - - [StringLength(50)] - public string InvoiceNum { get; set; } - - [StringLength(50)] - public string ExpressNum { get; set; } - - [Required] - [StringLength(50)] - public string VendId { get; set; } - - [Required] - [StringLength(50)] - public string OperName { get; set; } - - [StringLength(50)] - public string Remark { get; set; } - - [StringLength(50)] - public string CurrencyDesc { get; set; } - - [Required] - [StringLength(50)] - public string ErpPartCode { get; set; } - - [Required] - public string PartDesc1 { get; set; } - - [Required] - public string PartDesc2 { get; set; } - - [Required] - [StringLength(50)] - public string ProjectId { get; set; } - - [Required] - [StringLength(50)] - public string Unit { get; set; } - - [Required] - [StringLength(50)] - public string PartGroup { get; set; } - - - - [StringLength(100)] - public string Configuration { get; set; } - - public int? ValidityDays { get; set; } - - [StringLength(50)] - public string ReceivePort { get; set; } - - [StringLength(50)] - public string PalletSize { get; set; } - - - } -} diff --git a/CK.SCP.Models/ScpEntity/V_BillShip.cs b/CK.SCP.Models/ScpEntity/V_BillShip.cs deleted file mode 100644 index 2a0db19..0000000 --- a/CK.SCP.Models/ScpEntity/V_BillShip.cs +++ /dev/null @@ -1,93 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace CK.SCP.Models.ScpEntity -{ - public class V_BillShip - { - [DatabaseGenerated(DatabaseGeneratedOption.Identity)] - public int UID { get; set; } - - [Key] - [StringLength(50)] - public string Bill { get; set; } - - public DateTime BillTime { get; set; } - - [Required] - [StringLength(50)] - public string PoBillNum { get; set; } - - [Required] - [StringLength(50)] - public string VendId { get; set; } - - [Required] - [StringLength(50)] - public string OperName { get; set; } - - public DateTime ShipTime { get; set; } - - public int State { get; set; } - - [StringLength(50)] - public string Remark { get; set; } - - public DateTime? ReceiveTime { get; set; } - - [StringLength(50)] - public string ModType { get; set; } - - [Column(TypeName = "date")] - public DateTime? DueDate { get; set; } - - [StringLength(50)] - public string Contacter { get; set; } - - [StringLength(50)] - public string ShipToSite { get; set; } - - [StringLength(50)] - public string Buyer { get; set; } - - [StringLength(50)] - public string BuyerPhone { get; set; } - - - [Required] - [StringLength(50)] - public string VendName { get; set; } - - [Required] - [StringLength(2)] - public string VendAbbCode { get; set; } - - [StringLength(50)] - public string VendType { get; set; } - - [StringLength(50)] - public string Country { get; set; } - - [StringLength(50)] - public string City { get; set; } - - [StringLength(50)] - public string Currency { get; set; } - - [StringLength(200)] - public string Address { get; set; } - - [StringLength(50)] - public string ZipCode { get; set; } - - [StringLength(50)] - public string Phone { get; set; } - - [StringLength(50)] - public string Fax { get; set; } - - [StringLength(50)] - public string Email { get; set; } - } -} diff --git a/CK.SCP.Models/ScpEntity/V_BillShipDetail.cs b/CK.SCP.Models/ScpEntity/V_BillShipDetail.cs deleted file mode 100644 index 9c6b10b..0000000 --- a/CK.SCP.Models/ScpEntity/V_BillShipDetail.cs +++ /dev/null @@ -1,132 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace CK.SCP.Models.ScpEntity -{ - public class V_BillShipDetail - { - [DatabaseGenerated(DatabaseGeneratedOption.Identity)] - public int UID { get; set; } - - [Key] - [StringLength(50)] - public string BillNum { get; set; } - - - [StringLength(50)] - public string PoBillNum { get; set; } - - - [DatabaseGenerated(DatabaseGeneratedOption.None)] - public int PoLineNum { get; set; } - - [StringLength(50)] - public string PartCode { get; set; } - - - [StringLength(50)] - public string Batch { get; set; } - - [Column(TypeName = "date")] - public DateTime ProduceDate { get; set; } - - [StringLength(50)] - public string VendBatch { get; set; } - - [Column(TypeName = "money")] - public decimal BillQty { get; set; } - - [StringLength(50)] - public string PoUnit { get; set; } - - [StringLength(50)] - public string LocUnit { get; set; } - - [Column(TypeName = "money")] - public decimal Price { get; set; } - - [StringLength(50)] - public string Currency { get; set; } - - [Column(TypeName = "money")] - public decimal PackQty { get; set; } - - public int State { get; set; } - - - - public int? BillType { get; set; } - - public DateTime? BillTime { get; set; } - - - - [Required] - [StringLength(50)] - public string AsnBillNum { get; set; } - - [Required] - [StringLength(50)] - public string VendId { get; set; } - - [Required] - [StringLength(50)] - public string OperName { get; set; } - - public DateTime? ShipTime { get; set; } - - public DateTime? ReceiveTime { get; set; } - - [StringLength(50)] - public string Remark { get; set; } - - - [StringLength(50)] - public string AsnBillNUm { get; set; } - - - [Column(TypeName = "money")] - public decimal? ReceivedQty { get; set; } - - [Required] - [StringLength(50)] - public string ErpPartCode { get; set; } - - [Required] - public string PartDesc1 { get; set; } - - [Required] - public string PartDesc2 { get; set; } - - [Required] - [StringLength(50)] - public string ProjectId { get; set; } - - [Required] - [StringLength(50)] - public string Unit { get; set; } - - [Required] - [StringLength(50)] - public string PartGroup { get; set; } - - - - [StringLength(100)] - public string Configuration { get; set; } - - public int? ValidityDays { get; set; } - - [StringLength(50)] - public string ReceivePort { get; set; } - - [StringLength(50)] - public string PalletSize { get; set; } - - //收货数量 - [Column(TypeName = "money")] - public decimal? Expr15 { get; set; } - - } -} diff --git a/CK.SCP.Models/ScpEntity/V_Info.cs b/CK.SCP.Models/ScpEntity/V_Info.cs deleted file mode 100644 index 75cfed5..0000000 --- a/CK.SCP.Models/ScpEntity/V_Info.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace CK.SCP.Models.ScpEntity -{ - public class V_Info - { - [Key] - [DatabaseGenerated(DatabaseGeneratedOption.Identity)] - public int ID { get; set; } - - - [StringLength(50)] - public string FactoryCode { get; set; } - - [StringLength(50)] - public string InfoType { get; set; } - - - [StringLength(50)] - public string FactoryName { get; set; } - - [StringLength(50)] - public string SupplierCode { get; set; } - - - [StringLength(50)] - public string VendName { get; set; } - - [StringLength(50)] - public string Title { get; set; } - - - public string Content { get; set; } - - public DateTime AddTime { get; set; } - - [StringLength(500)] - public string UserName { get; set; } - - [StringLength(50)] - public string Enable { get; set; } - - public DateTime ReadTime { get; set; } - } -} diff --git a/CK.SCP.Models/ScpEntity/V_POAll.cs b/CK.SCP.Models/ScpEntity/V_POAll.cs deleted file mode 100644 index cece276..0000000 --- a/CK.SCP.Models/ScpEntity/V_POAll.cs +++ /dev/null @@ -1,55 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace CK.SCP.Models.ScpEntity -{ - public class V_POAll - { - [DatabaseGenerated(DatabaseGeneratedOption.Identity)] - public int UID { get; set; } - - [Key] - [StringLength(50)] - public string BillNum { get; set; } - - [Required] - [StringLength(50)] - public string VendId { get; set; } - - [Required] - [StringLength(50)] - public string OperName { get; set; } - - public DateTime BillTime { get; set; } - - [StringLength(50)] - public string ModType { get; set; } - - [Column(TypeName = "date")] - public DateTime? DueDate { get; set; } - - [StringLength(50)] - public string ShipToSite { get; set; } - - [StringLength(50)] - public string Buyer { get; set; } - - [StringLength(50)] - public string BuyerPhone { get; set; } - - public int State { get; set; } - - [StringLength(500)] - public string Remark { get; set; } - - [Required] - [StringLength(50)] - public string VendName { get; set; } - - [NotMapped] - [StringLength(50)] - public string SumOver { get; set; } - - } -} diff --git a/CK.SCP.Models/ScpEntity/V_POAllDetail.cs b/CK.SCP.Models/ScpEntity/V_POAllDetail.cs deleted file mode 100644 index 298b76c..0000000 --- a/CK.SCP.Models/ScpEntity/V_POAllDetail.cs +++ /dev/null @@ -1,125 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace CK.SCP.Models.ScpEntity -{ - public class V_POAllDetail - { - [DatabaseGenerated(DatabaseGeneratedOption.Identity)] - public int UID { get; set; } - - [Key] - [Column(Order = 0)] - [StringLength(50)] - public string BillNum { get; set; } - - [Key] - [Column(Order = 1)] - [DatabaseGenerated(DatabaseGeneratedOption.None)] - public int LineNum { get; set; } - - [Required] - [StringLength(50)] - public string PartCode { get; set; } - - [Column(TypeName = "money")] - public decimal BillQty { get; set; } - - [Column(TypeName = "money")] - public decimal ShippedQty { get; set; } - - [Column(TypeName = "money")] - public decimal ReceivedQty { get; set; } - - [StringLength(50)] - public string PoUnit { get; set; } - - [StringLength(50)] - public string LocUnit { get; set; } - - [Column(TypeName = "money")] - public decimal Price { get; set; } - - [StringLength(50)] - public string Currency { get; set; } - - [Column(TypeName = "date")] - public DateTime? DueDate { get; set; } - - [Column(TypeName = "money")] - public decimal PackQty { get; set; } - - public int State { get; set; } - - [StringLength(200)] - public string Remark { get; set; } - - [Required] - [StringLength(50)] - public string ErpPartCode { get; set; } - - [Required] - public string PartDesc1 { get; set; } - - [Required] - public string PartDesc2 { get; set; } - - [Required] - [StringLength(50)] - public string ProjectId { get; set; } - - [Required] - [StringLength(50)] - public string Unit { get; set; } - - [Required] - [StringLength(50)] - public string PartGroup { get; set; } - - - [StringLength(100)] - public string Configuration { get; set; } - - public int? ValidityDays { get; set; } - - [StringLength(50)] - public string ReceivePort { get; set; } - - [StringLength(50)] - public string PalletSize { get; set; } - - - [Required] - [StringLength(50)] - public string VendId { get; set; } - - [Required] - [StringLength(50)] - public string OperName { get; set; } - - public DateTime BillTime { get; set; } - - [StringLength(50)] - public string ModType { get; set; } - - - [StringLength(50)] - public string Contacter { get; set; } - - [StringLength(50)] - public string ShipToSite { get; set; } - - [StringLength(50)] - public string Buyer { get; set; } - - [StringLength(50)] - public string BuyerPhone { get; set; } - - [StringLength(50)] - public string CurrencyDesc { get; set; } - - [StringLength(50)] - public string VendName { get; set; } - } -} diff --git a/CK.SCP.Models/ScpEntity/V_POReport.cs b/CK.SCP.Models/ScpEntity/V_POReport.cs deleted file mode 100644 index 7f3dea3..0000000 --- a/CK.SCP.Models/ScpEntity/V_POReport.cs +++ /dev/null @@ -1,54 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace CK.SCP.Models.ScpEntity -{ - public class V_POReport - { - [DatabaseGenerated(DatabaseGeneratedOption.Identity)] - public int UID { get; set; } - - [Key] - [Column(Order = 0)] - [StringLength(50)] - public string BillNum { get; set; } - - [Key] - [Column(Order = 1)] - [DatabaseGenerated(DatabaseGeneratedOption.None)] - public int LineNum { get; set; } - - [Required] - [StringLength(50)] - public string PartCode { get; set; } - - - public decimal PlanQty { get; set; } - - - public decimal ShipQty { get; set; } - - - public decimal ReceiveQty { get; set; } - - - public decimal? RejectQty { get; set; } - - - public decimal OpenQty { get; set; } - - [Required] - [StringLength(50)] - public string OperName { get; set; } - - public DateTime BillTime { get; set; } - - [StringLength(50)] - public string VendName { get; set; } - - [StringLength(50)] - public string PartDesc1 { get; set; } - - } -} diff --git a/CK.SCP.Models/ScpEntity/V_PlanMonth.cs b/CK.SCP.Models/ScpEntity/V_PlanMonth.cs deleted file mode 100644 index e158ae2..0000000 --- a/CK.SCP.Models/ScpEntity/V_PlanMonth.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace CK.SCP.Models.ScpEntity -{ - public class V_PlanMonth - { - [Key] - [DatabaseGenerated(DatabaseGeneratedOption.Identity)] - public int ID { get; set; } - - [StringLength(50)] - public string Code { get; set; } - - [StringLength(50)] - public string SupplierCode { get; set; } - - public DateTime AddTime { get; set; } - - public DateTime? SendTime { get; set; } - - [StringLength(50)] - public string Name { get; set; } - - [StringLength(50)] - public string Ver { get; set; } - - public string FileName { get; set; } - - public string UserName { get; set; } - - public string IsSend { get; set; } - - public string VendName { get; set; } - } -} diff --git a/CK.SCP.Models/ScpEntity/V_QadOrder.cs b/CK.SCP.Models/ScpEntity/V_QadOrder.cs deleted file mode 100644 index dc28c13..0000000 --- a/CK.SCP.Models/ScpEntity/V_QadOrder.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; - -namespace CK.SCP.Models.ScpEntity -{ - public class V_QadOrder - { - [Key] - public decimal ID { get; set; } - - [StringLength(50)] - public string BillNo { get; set; } - - [StringLength(50)] - public string SupplierCode { get; set; } - - public DateTime StartDate { get; set; } - - public DateTime? EndDate { get; set; } - - - [StringLength(50)] - public string Address { get; set; } - - [StringLength(50)] - public string ProductCode { get; set; } - - public decimal Price { get; set; } - - public decimal Qty { get; set; } - - public decimal Qtyed { get; set; } - - public string PartName { get; set; } - - public string VendName { get; set; } - - } -} diff --git a/CK.SCP.Models/ScpEntity/V_Receive.cs b/CK.SCP.Models/ScpEntity/V_Receive.cs deleted file mode 100644 index 232004f..0000000 --- a/CK.SCP.Models/ScpEntity/V_Receive.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace CK.SCP.Models.ScpEntity -{ - public class V_Receive - { - [DatabaseGenerated(DatabaseGeneratedOption.Identity)] - public int UID { get; set; } - - [Key] - [StringLength(50)] - public string BillNum { get; set; } - - public int BillType { get; set; } - - public DateTime BillTime { get; set; } - - [Required] - [StringLength(50)] - public string PoBillNum { get; set; } - - [Required] - [StringLength(50)] - public string AsnBillNum { get; set; } - - [Required] - [StringLength(50)] - public string VendId { get; set; } - - [Required] - [StringLength(50)] - public string OperName { get; set; } - - public DateTime ShipTime { get; set; } - - public DateTime ReceiveTime { get; set; } - - public int State { get; set; } - - [StringLength(50)] - public string Remark { get; set; } - [StringLength(50)] - public string QadBillNo { get; set; } - - [Required] - [StringLength(50)] - public string VendName { get; set; } - - } - -} diff --git a/CK.SCP.Models/ScpEntity/V_ReceiveDetail.cs b/CK.SCP.Models/ScpEntity/V_ReceiveDetail.cs deleted file mode 100644 index b4d9690..0000000 --- a/CK.SCP.Models/ScpEntity/V_ReceiveDetail.cs +++ /dev/null @@ -1,90 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace CK.SCP.Models.ScpEntity -{ - public class V_ReceiveDetail - { - - public string UID { get; set; } - - [Key] - [Column(Order = 0)] - [StringLength(50)] - public string BillNum { get; set; } - - // [Key] - // [Column(Order = 1)] - [StringLength(50)] - public string PoBillNum { get; set; } - // - // [Key] - [Column(Order = 1)] - [DatabaseGenerated(DatabaseGeneratedOption.None)] - public int PoLineNum { get; set; } - - - [Key] - [Column(Order = 2)] - [StringLength(50)] - public string PartCode { get; set; } - - - [StringLength(50)] - public string Batch { get; set; } - - [Column(TypeName = "date")] - public DateTime ProduceDate { get; set; } - - [StringLength(50)] - public string VendBatch { get; set; } - - - public decimal BillQty { get; set; } - - - public decimal ReceivedQty { get; set; } - - [StringLength(50)] - public string PoUnit { get; set; } - - [StringLength(50)] - public string LocUnit { get; set; } - - [Column(TypeName = "money")] - public decimal Price { get; set; } - - [StringLength(50)] - public string Currency { get; set; } - - [Column(TypeName = "money")] - public decimal PackQty { get; set; } - - public int State { get; set; } - - - public int BillType { get; set; } - - [Required] - [StringLength(50)] - public string AsnBillNum { get; set; } - - [Required] - [StringLength(50)] - public string VendId { get; set; } - - - public DateTime ReceiveTime { get; set; } - - public Int32 Qty => Convert.ToInt32(ReceivedQty) - Convert.ToInt32(BillQty); - - - [Required] - public string PartDesc1 { get; set; } - - [StringLength(50)] - public string Remark { get; set; } - - } -} diff --git a/CK.SCP.Models/ScpEntity/V_ReportReceive.cs b/CK.SCP.Models/ScpEntity/V_ReportReceive.cs deleted file mode 100644 index 5782b1d..0000000 --- a/CK.SCP.Models/ScpEntity/V_ReportReceive.cs +++ /dev/null @@ -1,92 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace CK.SCP.Models.ScpEntity -{ - public class V_ReceiveReport - { - public int UID { get; set; } - - [Key] - [StringLength(50)] - public string BillNum { get; set; } - - [StringLength(50)] - public string PoBillNum { get; set; } - - - [DatabaseGenerated(DatabaseGeneratedOption.None)] - public int PoLineNum { get; set; } - - [StringLength(50)] - public string PartCode { get; set; } - - - [StringLength(50)] - public string Batch { get; set; } - - [Column(TypeName = "date")] - public DateTime ProduceDate { get; set; } - - [StringLength(50)] - public string VendBatch { get; set; } - - [Column(TypeName = "money")] - public decimal BillQty { get; set; } - - [Column(TypeName = "money")] - public decimal ReceivedQty { get; set; } - - [StringLength(50)] - public string PoUnit { get; set; } - - [StringLength(50)] - public string LocUnit { get; set; } - - [Column(TypeName = "money")] - public decimal Price { get; set; } - - [StringLength(50)] - public string Currency { get; set; } - - [Column(TypeName = "money")] - public decimal PackQty { get; set; } - - public int State { get; set; } - - - public int BillType { get; set; } - - public DateTime BillTime { get; set; } - - - - [Required] - [StringLength(50)] - public string AsnBillNum { get; set; } - - [Required] - [StringLength(50)] - public string VendId { get; set; } - - [Required] - [StringLength(50)] - public string OperName { get; set; } - - public DateTime ShipTime { get; set; } - - public DateTime ReceiveTime { get; set; } - - - [StringLength(50)] - public string Remark { get; set; } - - - [StringLength(50)] - public string VendName { get; set; } - - [StringLength(50)] - public string PartDesc1 { get; set; } - } -} diff --git a/CK.SCP.Models/ScpEntity/V_Stock.cs b/CK.SCP.Models/ScpEntity/V_Stock.cs deleted file mode 100644 index 5da7349..0000000 --- a/CK.SCP.Models/ScpEntity/V_Stock.cs +++ /dev/null @@ -1,54 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace CK.SCP.Models.ScpEntity -{ - public class V_Stock - { - [DatabaseGenerated(DatabaseGeneratedOption.Identity)] - public long UID { get; set; } - - [Key] - [Column(Order = 0)] - [StringLength(50)] - public string BarCode { get; set; } - - [Key] - [Column(Order = 1)] - [StringLength(500)] - public string LocCode { get; set; } - - [Required] - [StringLength(50)] - public string PartCode { get; set; } - - [StringLength(50)] - public string VendId { get; set; } - - [Required] - [StringLength(50)] - public string Batch { get; set; } - - [Column(TypeName = "datetime2")] - public DateTime ProduceDate { get; set; } - - [Column(TypeName = "datetime2")] - public DateTime ReceiveDate { get; set; } - - [Required] - public decimal Qty { get; set; } - - [Key] - [Column(Order = 2)] - public int state { get; set; } - - [Required] - [StringLength(50)] - public string Remark { get; set; } - - [Required] - [StringLength(50)] - public string PartDesc1 { get; set; } - } -} diff --git a/CK.SCP.Models/ScpEntity/V_TB_ASK.cs b/CK.SCP.Models/ScpEntity/V_TB_ASK.cs deleted file mode 100644 index fa7dd69..0000000 --- a/CK.SCP.Models/ScpEntity/V_TB_ASK.cs +++ /dev/null @@ -1,39 +0,0 @@ -//------------------------------------------------------------------------------ -// <auto-generated> -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// </auto-generated> -//------------------------------------------------------------------------------ - -namespace CK.SCP.Models.ScpEntity -{ - using System; - using System.Collections.Generic; - - using System.ComponentModel.DataAnnotations; - using System.ComponentModel.DataAnnotations.Schema; - - - public partial class V_TB_ASK - { - public int UID { get; set; } - public string PoBillNum { get; set; } - public string AskBillNum { get; set; } - public string VendId { get; set; } - public string Site { get; set; } - public string Buyer { get; set; } - public string BuyerPhone { get; set; } - public int State { get; set; } - public string Remark { get; set; } - public System.DateTime CreateTime { get; set; } - public string CreateUser { get; set; } - public Nullable<System.DateTime> UpdateTime { get; set; } - public string UpdateUser { get; set; } - public string UpdateInfo { get; set; } - public bool IsDeleted { get; set; } - public System.Guid GUID { get; set; } - public string VendName { get; set; } - } -} diff --git a/CK.SCP.Models/ScpEntity/V_TB_ASK_DETAIL.cs b/CK.SCP.Models/ScpEntity/V_TB_ASK_DETAIL.cs deleted file mode 100644 index 572e1f7..0000000 --- a/CK.SCP.Models/ScpEntity/V_TB_ASK_DETAIL.cs +++ /dev/null @@ -1,52 +0,0 @@ -//------------------------------------------------------------------------------ -// <auto-generated> -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// </auto-generated> -//------------------------------------------------------------------------------ - -namespace CK.SCP.Models.ScpEntity -{ - using System; - using System.Collections.Generic; - - using System.ComponentModel.DataAnnotations; - using System.ComponentModel.DataAnnotations.Schema; - - - public partial class V_TB_ASK_DETAIL - { - public int UID { get; set; } - public string PoBillNum { get; set; } - public int PoLine { get; set; } - public string PartCode { get; set; } - public decimal ShippedQty { get; set; } - public decimal ReceivedQty { get; set; } - public Nullable<System.DateTime> BeginTime { get; set; } - public Nullable<System.DateTime> EndTime { get; set; } - public string PoUnit { get; set; } - public string LocUnit { get; set; } - public decimal Price { get; set; } - public string Currency { get; set; } - public decimal PackQty { get; set; } - public decimal UnConv { get; set; } - public string DockCode { get; set; } - public int State { get; set; } - public string Remark { get; set; } - public System.DateTime CreateTime { get; set; } - public string CreateUser { get; set; } - public Nullable<System.DateTime> UpdateTime { get; set; } - public string UpdateUser { get; set; } - public string UpdateInfo { get; set; } - public bool IsDeleted { get; set; } - public System.Guid GUID { get; set; } - public string PartDesc1 { get; set; } - public string CurrencyDesc { get; set; } - public string Site { get; set; } - public string VendName { get; set; } - public string PartDesc2 { get; set; } - public string AskBillNum { get; set; } - } -} diff --git a/CK.SCP.Models/ScpEntity/V_TB_ASN.cs b/CK.SCP.Models/ScpEntity/V_TB_ASN.cs deleted file mode 100644 index e4cbff7..0000000 --- a/CK.SCP.Models/ScpEntity/V_TB_ASN.cs +++ /dev/null @@ -1,47 +0,0 @@ -//------------------------------------------------------------------------------ -// <auto-generated> -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// </auto-generated> -//------------------------------------------------------------------------------ - -namespace CK.SCP.Models.ScpEntity -{ - using System; - using System.Collections.Generic; - - using System.ComponentModel.DataAnnotations; - using System.ComponentModel.DataAnnotations.Schema; - - - public partial class V_TB_ASN - { - public int UID { get; set; } - public string AsnBillNum { get; set; } - public string AskBillNum { get; set; } - public string PoBillNum { get; set; } - public string VendId { get; set; } - public int State { get; set; } - public string Remark { get; set; } - public System.DateTime CreateTime { get; set; } - public string CreateUser { get; set; } - public Nullable<System.DateTime> UpdateTime { get; set; } - public string UpdateUser { get; set; } - public string UpdateInfo { get; set; } - public Nullable<System.DateTime> ShipTime { get; set; } - public string ShipUser { get; set; } - public Nullable<System.DateTime> ReceiveTime { get; set; } - public string ReceiveUser { get; set; } - public bool IsDeleted { get; set; } - public System.Guid GUID { get; set; } - public string ErpBillNum { get; set; } - public Nullable<int> ModType { get; set; } - public string Contacter { get; set; } - public string Buyer { get; set; } - public string BuyerPhone { get; set; } - public string VendName { get; set; } - public string Site { get; set; } - } -} diff --git a/CK.SCP.Models/ScpEntity/V_TB_ASN_DETAIL.cs b/CK.SCP.Models/ScpEntity/V_TB_ASN_DETAIL.cs deleted file mode 100644 index 0c39cfe..0000000 --- a/CK.SCP.Models/ScpEntity/V_TB_ASN_DETAIL.cs +++ /dev/null @@ -1,45 +0,0 @@ -//------------------------------------------------------------------------------ -// <auto-generated> -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// </auto-generated> -//------------------------------------------------------------------------------ - -namespace CK.SCP.Models.ScpEntity -{ - using System; - using System.Collections.Generic; - - using System.ComponentModel.DataAnnotations; - using System.ComponentModel.DataAnnotations.Schema; - - - public partial class V_TB_ASN_DETAIL - { - public int UID { get; set; } - public string AsnBillNum { get; set; } - public string PoBillNum { get; set; } - public int PoLine { get; set; } - public string PartCode { get; set; } - public string Batch { get; set; } - public Nullable<System.DateTime> ProduceDate { get; set; } - public string VendBatch { get; set; } - public decimal Qty { get; set; } - public string PoUnit { get; set; } - public string LocUnit { get; set; } - public decimal PackQty { get; set; } - public decimal UnConv { get; set; } - public string DockCode { get; set; } - public Nullable<int> State { get; set; } - public string Remark { get; set; } - public System.DateTime CreateTime { get; set; } - public string CreateUser { get; set; } - public Nullable<System.DateTime> UpdateTime { get; set; } - public string UpdateUser { get; set; } - public string UpdateInfo { get; set; } - public bool IsDeleted { get; set; } - public System.Guid GUID { get; set; } - } -} diff --git a/CK.SCP.Models/ScpEntity/V_TB_PO.cs b/CK.SCP.Models/ScpEntity/V_TB_PO.cs deleted file mode 100644 index b8059e8..0000000 --- a/CK.SCP.Models/ScpEntity/V_TB_PO.cs +++ /dev/null @@ -1,37 +0,0 @@ -//------------------------------------------------------------------------------ -// <auto-generated> -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// </auto-generated> -//------------------------------------------------------------------------------ - -namespace CK.SCP.Models.ScpEntity -{ - using System; - using System.Collections.Generic; - - public partial class V_TB_PO - { - public int UID { get; set; } - public string PoBillNum { get; set; } - public string ErpBillNum { get; set; } - public string VendId { get; set; } - public Nullable<int> ModType { get; set; } - public string Contacter { get; set; } - public string Site { get; set; } - public string Buyer { get; set; } - public string BuyerPhone { get; set; } - public int State { get; set; } - public string Remark { get; set; } - public System.DateTime CreateTime { get; set; } - public string CreateUser { get; set; } - public Nullable<System.DateTime> UpdateTime { get; set; } - public string UpdateUser { get; set; } - public string UpdateInfo { get; set; } - public bool IsDeleted { get; set; } - public System.Guid GUID { get; set; } - public string VendName { get; set; } - } -} diff --git a/CK.SCP.Models/ScpEntity/V_TB_PO_DETAIL.cs b/CK.SCP.Models/ScpEntity/V_TB_PO_DETAIL.cs deleted file mode 100644 index 778108d..0000000 --- a/CK.SCP.Models/ScpEntity/V_TB_PO_DETAIL.cs +++ /dev/null @@ -1,57 +0,0 @@ -//------------------------------------------------------------------------------ -// <auto-generated> -// 此代码已从模板生成。 -// -// 手动更改此文件可能导致应用程序出现意外的行为。 -// 如果重新生成代码,将覆盖对此文件的手动更改。 -// </auto-generated> -//------------------------------------------------------------------------------ - -namespace CK.SCP.Models.ScpEntity -{ - using System; - using System.Collections.Generic; - - using System.ComponentModel.DataAnnotations; - using System.ComponentModel.DataAnnotations.Schema; - - public partial class V_TB_PO_DETAIL - { - public int UID { get; set; } - public string PoBillNum { get; set; } - public int PoLine { get; set; } - public string PartCode { get; set; } - public decimal PlanQty { get; set; } - public decimal ShippedQty { get; set; } - public decimal ReceivedQty { get; set; } - public string RejectQty { get; set; } - public Nullable<System.DateTime> BeginTime { get; set; } - public Nullable<System.DateTime> EndTime { get; set; } - public string PoUnit { get; set; } - public string LocUnit { get; set; } - public decimal Price { get; set; } - public string Currency { get; set; } - public decimal PackQty { get; set; } - public decimal UnConv { get; set; } - public string DockCode { get; set; } - public int State { get; set; } - public string Remark { get; set; } - public System.DateTime CreateTime { get; set; } - public string CreateUser { get; set; } - public Nullable<System.DateTime> UpdateTime { get; set; } - public string UpdateUser { get; set; } - public string UpdateInfo { get; set; } - public bool IsDeleted { get; set; } - public System.Guid GUID { get; set; } - public string PartDesc1 { get; set; } - public string CurrencyDesc { get; set; } - public string ErpBillNum { get; set; } - public Nullable<int> ModType { get; set; } - public string Contacter { get; set; } - public string Site { get; set; } - public string Buyer { get; set; } - public string BuyerPhone { get; set; } - public string VendName { get; set; } - public string PartDesc2 { get; set; } - } -} diff --git a/CK.SCP.Models/UniApiEntity/IControlTable.cs b/CK.SCP.Models/UniApiEntity/IControlTable.cs deleted file mode 100644 index b9b18d0..0000000 --- a/CK.SCP.Models/UniApiEntity/IControlTable.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace CK.SCP.Models.UniApiEntity -{ - public interface IControlTable:ITable - { - string TableName { get; set; } - int RowCount { get; set; } - - } - -} \ No newline at end of file diff --git a/CK.SCP.Models/UniApiEntity/IDataTable.cs b/CK.SCP.Models/UniApiEntity/IDataTable.cs deleted file mode 100644 index b8f078e..0000000 --- a/CK.SCP.Models/UniApiEntity/IDataTable.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace CK.SCP.Models.UniApiEntity -{ - public interface IDataTable:ITable - { - - DateTime? CreateTime { get; set; } - string CreateUser { get; set; } - DateTime? UpdateTime { get; set; } - string UpdateUser { get; set; } - - } - - public interface IInterfaceGetNew - { - List<IControlTable> GetNewCtrlList(UniApiEntities db); - } - - public interface IInterfaceRead - { - - ITable Read(UniApiEntities db, string seq); - List<ITable> ListRead(UniApiEntities db, string seq); - } - - public interface IInterfaceWrite - { - int Write(UniApiEntities db); - int ListWrite(UniApiEntities db, List<ITable> dataList); - } - - -} \ No newline at end of file diff --git a/CK.SCP.Models/UniApiEntity/ITable.cs b/CK.SCP.Models/UniApiEntity/ITable.cs deleted file mode 100644 index 6a3c082..0000000 --- a/CK.SCP.Models/UniApiEntity/ITable.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace CK.SCP.Models.UniApiEntity -{ - public interface ITable - { - int UID { get; set; } - string Seq { get; set; } - - string QadRead { get; set; } - string WmsRead { get; set; } - string ScmRead { get; set; } - string MesRead { get; set; } - string Remark { get; set; } - } -} \ No newline at end of file diff --git a/CK.SCP.Models/UniApiEntity/QadTableName.cs b/CK.SCP.Models/UniApiEntity/QadTableName.cs deleted file mode 100644 index 024e692..0000000 --- a/CK.SCP.Models/UniApiEntity/QadTableName.cs +++ /dev/null @@ -1,78 +0,0 @@ -using System.ComponentModel; - -namespace CK.SCP.Models.UniApiEntity -{ - public enum QadTableName - { - [Description("物料信息")] - xxqad_pt_mstr, - [Description("供应商信息")] - xxqad_vd_mstr, - [Description("客户信息")] - xxqad_cm_mstr, - [Description("供应商物料信息")] - xxqad_vp_mstr, - [Description("客户物料物料信息")] - xxqad_sche_mstr, - [Description("采购价格信息")] - xxqad_pprice_det, - [Description("销售价格信息")] - xxqad_sprice_det, - [Description("采购订单信息")] - xxqad_pod_det, - [Description("销售订单信息")] - xxqad_sod_det, - [Description("库位信息")] - xxqad_loc_det, - [Description("实时库存明细信息")] - xxqad_ld_det, - [Description("BOM信息")] - xxqad_ps_mstr, - [Description("标准成本信息")] - xxqad_sct_det, - [Description("生产线零件信息")] - xxqad_line_mstr, - [Description("????信息")] - xxqad_repsch_det, - [Description("收货单信息")] - xxqad_prh_det - } - - public enum ScmTableName - { - [Description("采购订单")] - xxscm_pod_det, - [Description("发货单(ASN)")] - xxscm_tx_mstr, - [Description("发货单标签列表")] - xxscm_tx_det, - [Description("发票")] - xxscm_inv_det, - } - - public enum WmsTableName - { - [Description("采购收货")] - xxwms_rc_det, - [Description("采购退货")] - xxwms_rt_det, - [Description("库存明细")] - xxwms_ld_det, - [Description("库存转移")] - xxwms_tr_det, - [Description("生产回冲")] - xxwms_bk_mstr, - [Description("其它出库")] - xxwms_iss_det, - [Description("其它入库")] - xxwms_rct_det, - [Description("销售结算")] - xxwms_soiss_det, - [Description("盘点调整")] - xxwms_tag_det, - [Description("接口")]//TODO 回头需要改成中间库的表名 - TS_UNI_API, - - - } -} \ No newline at end of file diff --git a/CK.SCP.Models/UniApiEntity/UniApiEntities.cs b/CK.SCP.Models/UniApiEntity/UniApiEntities.cs deleted file mode 100644 index 89366a7..0000000 --- a/CK.SCP.Models/UniApiEntity/UniApiEntities.cs +++ /dev/null @@ -1,2162 +0,0 @@ -using System.Data.Entity; - -namespace CK.SCP.Models.UniApiEntity -{ - [DbConfigurationType(typeof(SqlDbConfiguration))] - public partial class UniApiEntities : DbContext - { - public UniApiEntities(string strConn) - : base(strConn) - { - } - public UniApiEntities() - : base("name=ModelUniApi") - { - } - - public virtual DbSet<xxmes_ctrl> xxmes_ctrl { get; set; } - public virtual DbSet<xxqad_cm_mstr> xxqad_cm_mstr { get; set; } - public virtual DbSet<xxqad_ctrl> xxqad_ctrl { get; set; } - public virtual DbSet<xxqad_ld_det> xxqad_ld_det { get; set; } - public virtual DbSet<xxqad_loc_det> xxqad_loc_det { get; set; } - public virtual DbSet<xxqad_pod_det> xxqad_pod_det { get; set; } - public virtual DbSet<xxqad_pprice_det> xxqad_pprice_det { get; set; } - public virtual DbSet<xxqad_prh_det> xxqad_prh_det { get; set; } - public virtual DbSet<xxqad_ps_mstr> xxqad_ps_mstr { get; set; } - public virtual DbSet<xxqad_pt_mstr> xxqad_pt_mstr { get; set; } - public virtual DbSet<xxqad_sche_mstr> xxqad_sche_mstr { get; set; } - public virtual DbSet<xxqad_sct_det> xxqad_sct_det { get; set; } - public virtual DbSet<xxqad_sod_det> xxqad_sod_det { get; set; } - public virtual DbSet<xxqad_sprice_det> xxqad_sprice_det { get; set; } - public virtual DbSet<xxqad_vd_mstr> xxqad_vd_mstr { get; set; } - public virtual DbSet<xxqad_vp_mstr> xxqad_vp_mstr { get; set; } - public virtual DbSet<xxscm_ctrl> xxscm_ctrl { get; set; } - public virtual DbSet<xxscm_inv_det> xxscm_inv_det { get; set; } - public virtual DbSet<xxscm_pod_det> xxscm_pod_det { get; set; } - public virtual DbSet<xxscm_tx_det> xxscm_tx_det { get; set; } - public virtual DbSet<xxscm_tx_mstr> xxscm_tx_mstr { get; set; } - public virtual DbSet<xxwms_bk_mstr> xxwms_bk_mstr { get; set; } - public virtual DbSet<xxwms_ctrl> xxwms_ctrl { get; set; } - public virtual DbSet<xxwms_iss_det> xxwms_iss_det { get; set; } - public virtual DbSet<xxwms_ld_det> xxwms_ld_det { get; set; } - public virtual DbSet<xxwms_rc_det> xxwms_rc_det { get; set; } - public virtual DbSet<xxwms_rct_det> xxwms_rct_det { get; set; } - public virtual DbSet<xxwms_rt_det> xxwms_rt_det { get; set; } - public virtual DbSet<xxwms_soiss_det> xxwms_soiss_det { get; set; } - public virtual DbSet<xxwms_tag_det> xxwms_tag_det { get; set; } - public virtual DbSet<xxwms_tr_det> xxwms_tr_det { get; set; } - - protected override void OnModelCreating(DbModelBuilder modelBuilder) - { - modelBuilder.Entity<xxmes_ctrl>() - .Property(e => e.xxmes_seq) - .IsUnicode(false); - - modelBuilder.Entity<xxmes_ctrl>() - .Property(e => e.xxmes_table) - .IsUnicode(false); - - modelBuilder.Entity<xxmes_ctrl>() - .Property(e => e.xxmes_qad) - .IsUnicode(false); - - modelBuilder.Entity<xxmes_ctrl>() - .Property(e => e.xxmes_mes) - .IsUnicode(false); - - modelBuilder.Entity<xxmes_ctrl>() - .Property(e => e.xxmes_scm) - .IsUnicode(false); - - modelBuilder.Entity<xxmes_ctrl>() - .Property(e => e.xxmes_wms) - .IsUnicode(false); - - modelBuilder.Entity<xxmes_ctrl>() - .Property(e => e.xxmes_rmks) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_cm_mstr>() - .Property(e => e.xxqad_cm_seq) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_cm_mstr>() - .Property(e => e.xxqad_cm_addr) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_cm_mstr>() - .Property(e => e.xxqad_cm_domain) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_cm_mstr>() - .Property(e => e.xxqad_cm_name) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_cm_mstr>() - .Property(e => e.xxqad_cm_line1) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_cm_mstr>() - .Property(e => e.xxqad_cm_line2) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_cm_mstr>() - .Property(e => e.xxqad_cm_line3) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_cm_mstr>() - .Property(e => e.xxqad_cm_country) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_cm_mstr>() - .Property(e => e.xxqad_cm_city) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_cm_mstr>() - .Property(e => e.xxqad_cm_phone) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_cm_mstr>() - .Property(e => e.xxqad_cm_fax) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_cm_mstr>() - .Property(e => e.xxqad_cm_pst_id) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_cm_mstr>() - .Property(e => e.xxqad_cm_attn) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_cm_mstr>() - .Property(e => e.xxqad_cm_curr) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_cm_mstr>() - .Property(e => e.xxqad_cm_promo) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_cm_mstr>() - .Property(e => e.xxqad_cm_qadread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_cm_mstr>() - .Property(e => e.xxqad_cm_wmsread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_cm_mstr>() - .Property(e => e.xxqad_cm_scmread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_cm_mstr>() - .Property(e => e.xxqad_cm_mesread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_cm_mstr>() - .Property(e => e.xxqad_cm_rmks) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_cm_mstr>() - .Property(e => e.xxqad_cm_createur) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_cm_mstr>() - .Property(e => e.xxqad_cm_updateur) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_ctrl>() - .Property(e => e.xxqad_seq) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_ctrl>() - .Property(e => e.xxqad_table) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_ctrl>() - .Property(e => e.xxqad_qad) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_ctrl>() - .Property(e => e.xxqad_mes) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_ctrl>() - .Property(e => e.xxqad_scm) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_ctrl>() - .Property(e => e.xxqad_wms) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_ctrl>() - .Property(e => e.xxqad_rmks) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_ld_det>() - .Property(e => e.xxqad_ld_wmsread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_ld_det>() - .Property(e => e.xxqad_ld_seq) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_ld_det>() - .Property(e => e.xxqad_ld_site) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_ld_det>() - .Property(e => e.xxqad_ld_part) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_ld_det>() - .Property(e => e.xxqad_ld_loc) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_ld_det>() - .Property(e => e.xxqad_ld_lot) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_ld_det>() - .Property(e => e.xxqad_ld_qty) - .HasPrecision(18, 5); - - modelBuilder.Entity<xxqad_ld_det>() - .Property(e => e.xxqad_ld_um) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_ld_det>() - .Property(e => e.xxqad_ld_domain) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_ld_det>() - .Property(e => e.xxqad_ld_qadread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_ld_det>() - .Property(e => e.xxqad_ld_scmread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_ld_det>() - .Property(e => e.xxqad_ld_mesread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_ld_det>() - .Property(e => e.xxqad_ld_rmks) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_ld_det>() - .Property(e => e.xxqad_ld_createur) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_ld_det>() - .Property(e => e.xxqad_ld_updateur) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_loc_det>() - .Property(e => e.xxqad_loc_seq) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_loc_det>() - .Property(e => e.xxqad_loc_loc) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_loc_det>() - .Property(e => e.xxqad_loc_site) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_loc_det>() - .Property(e => e.xxqad_loc_desc) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_loc_det>() - .Property(e => e.xxqad_loc_type) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_loc_det>() - .Property(e => e.xxqad_loc_domain) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_loc_det>() - .Property(e => e.xxqad_loc_qadread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_loc_det>() - .Property(e => e.xxqad_loc_wmsread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_loc_det>() - .Property(e => e.xxqad_loc_scmread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_loc_det>() - .Property(e => e.xxqad_loc_mesread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_loc_det>() - .Property(e => e.xxqad_loc_rmks) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_loc_det>() - .Property(e => e.xxqad_loc_createur) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_loc_det>() - .Property(e => e.xxqad_loc_updateur) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pod_det>() - .Property(e => e.xxqad_pod_seq) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pod_det>() - .Property(e => e.xxqad_pod_nbr) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pod_det>() - .Property(e => e.xxqad_pod_modtype) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pod_det>() - .Property(e => e.xxqad_pod_site) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pod_det>() - .Property(e => e.xxqad_pod_domain) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pod_det>() - .Property(e => e.xxqad_pod_part) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pod_det>() - .Property(e => e.xxqad_pod_desc) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pod_det>() - .Property(e => e.xxqad_pod_qty_ord) - .HasPrecision(18, 5); - - modelBuilder.Entity<xxqad_pod_det>() - .Property(e => e.xxqad_pod_qty_rct) - .HasPrecision(18, 5); - - modelBuilder.Entity<xxqad_pod_det>() - .Property(e => e.xxqad_pod_qty_std) - .HasPrecision(18, 5); - - modelBuilder.Entity<xxqad_pod_det>() - .Property(e => e.xxqad_pod_price) - .HasPrecision(18, 5); - - modelBuilder.Entity<xxqad_pod_det>() - .Property(e => e.xxqad_pod_curr) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pod_det>() - .Property(e => e.xxqad_pod_loc_um) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pod_det>() - .Property(e => e.xxqad_pod_um) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pod_det>() - .Property(e => e.xxqad_pod_um_conv) - .HasPrecision(18, 5); - - modelBuilder.Entity<xxqad_pod_det>() - .Property(e => e.xxqad_pod_vend) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pod_det>() - .Property(e => e.xxqad_pod_name) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pod_det>() - .Property(e => e.xxqad_pod_attn) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pod_det>() - .Property(e => e.xxqad_pod_ship) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pod_det>() - .Property(e => e.xxqad_pod_made) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pod_det>() - .Property(e => e.xxqad_pod_buyer) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pod_det>() - .Property(e => e.xxqad_pod_buyer_phone) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pod_det>() - .Property(e => e.xxqad_pod_status) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pod_det>() - .Property(e => e.xxqad_pod_qadread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pod_det>() - .Property(e => e.xxqad_pod_wmsread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pod_det>() - .Property(e => e.xxqad_pod_scmread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pod_det>() - .Property(e => e.xxqad_pod_mesread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pod_det>() - .Property(e => e.xxqad_pod_rmks) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pod_det>() - .Property(e => e.xxqad_pod_createur) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pod_det>() - .Property(e => e.xxqad_pod_updateur) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pprice_det>() - .Property(e => e.xxqad_pprice_seq) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pprice_det>() - .Property(e => e.xxqad_pprice_list) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pprice_det>() - .Property(e => e.xxqad_pprice_domain) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pprice_det>() - .Property(e => e.xxqad_pprice_part) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pprice_det>() - .Property(e => e.xxqad_pprice_curr) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pprice_det>() - .Property(e => e.xxqad_pprice_um) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pprice_det>() - .Property(e => e.xxqad_pprice_amt) - .HasPrecision(18, 5); - - modelBuilder.Entity<xxqad_pprice_det>() - .Property(e => e.xxqad_pprice_qadread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pprice_det>() - .Property(e => e.xxqad_pprice_wmsread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pprice_det>() - .Property(e => e.xxqad_pprice_scmread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pprice_det>() - .Property(e => e.xxqad_pprice_mesread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pprice_det>() - .Property(e => e.xxqad_pprice_rmks) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pprice_det>() - .Property(e => e.xxqad_pprice_createur) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pprice_det>() - .Property(e => e.xxqad_pprice_updateur) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_prh_det>() - .Property(e => e.xxqad_prh_seq) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_prh_det>() - .Property(e => e.xxqad_prh_receiver) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_prh_det>() - .Property(e => e.xxqad_prh_psnbr) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_prh_det>() - .Property(e => e.xxqad_prh_trtype) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_prh_det>() - .Property(e => e.xxqad_prh_po_nbr) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_prh_det>() - .Property(e => e.xxqad_prh_part) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_prh_det>() - .Property(e => e.xxqad_prh_qty_rcvd) - .HasPrecision(18, 5); - - modelBuilder.Entity<xxqad_prh_det>() - .Property(e => e.xxqad_prh_qty_ord) - .HasPrecision(18, 5); - - modelBuilder.Entity<xxqad_prh_det>() - .Property(e => e.xxqad_prh_pur_cost) - .HasPrecision(18, 5); - - modelBuilder.Entity<xxqad_prh_det>() - .Property(e => e.xxqad_prh_curr) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_prh_det>() - .Property(e => e.xxqad_prh_curr_amt) - .HasPrecision(18, 5); - - modelBuilder.Entity<xxqad_prh_det>() - .Property(e => e.xxqad_prh_site) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_prh_det>() - .Property(e => e.xxqad_prh_vend) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_prh_det>() - .Property(e => e.xxqad_prh_ware_class) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_prh_det>() - .Property(e => e.xxqad_prh_ware) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_prh_det>() - .Property(e => e.xxqad_prh_loc) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_prh_det>() - .Property(e => e.xxqad_prh_po_um) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_prh_det>() - .Property(e => e.xxqad_prh_loc_um) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_prh_det>() - .Property(e => e.xxqad_prh_conv) - .HasPrecision(18, 5); - - modelBuilder.Entity<xxqad_prh_det>() - .Property(e => e.xxqad_prh_lot) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_prh_det>() - .Property(e => e.xxqad_prh_vend_batch) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_prh_det>() - .Property(e => e.xxqad_prh_qadread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_prh_det>() - .Property(e => e.xxqad_prh_wmsread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_prh_det>() - .Property(e => e.xxqad_prh_scmread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_prh_det>() - .Property(e => e.xxqad_prh_mesread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_prh_det>() - .Property(e => e.xxqad_prh_rmks) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_prh_det>() - .Property(e => e.xxqad_prh_createur) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_prh_det>() - .Property(e => e.xxqad_prh_updateur) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_prh_det>() - .Property(e => e.xxqad_prh_domain) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_ps_mstr>() - .Property(e => e.xxqad_ps_seq) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_ps_mstr>() - .Property(e => e.xxqad_ps_part) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_ps_mstr>() - .Property(e => e.xxqad_ps_comp) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_ps_mstr>() - .Property(e => e.xxqad_ps_ref) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_ps_mstr>() - .Property(e => e.xxqad_ps_domain) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_ps_mstr>() - .Property(e => e.xxqad_ps_qty_per) - .HasPrecision(18, 5); - - modelBuilder.Entity<xxqad_ps_mstr>() - .Property(e => e.xxqad_ps_ps_code) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_ps_mstr>() - .Property(e => e.xxqad_ps_rmks) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_ps_mstr>() - .Property(e => e.xxqad_ps_qadread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_ps_mstr>() - .Property(e => e.xxqad_ps_wmsread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_ps_mstr>() - .Property(e => e.xxqad_ps_scmread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_ps_mstr>() - .Property(e => e.xxqad_ps_mesread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_ps_mstr>() - .Property(e => e.xxqad_ps_rmks1) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_ps_mstr>() - .Property(e => e.xxqad_ps_createur) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_ps_mstr>() - .Property(e => e.xxqad_ps_updateur) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pt_mstr>() - .Property(e => e.xxqad_pt_seq) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pt_mstr>() - .Property(e => e.xxqad_pt_part) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pt_mstr>() - .Property(e => e.xxqad_pt_domain) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pt_mstr>() - .Property(e => e.xxqad_pt_site) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pt_mstr>() - .Property(e => e.xxqad_pt_um) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pt_mstr>() - .Property(e => e.xxqad_pt_desc1) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pt_mstr>() - .Property(e => e.xxqad_pt_desc2) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pt_mstr>() - .Property(e => e.xxqad_pt_dsgn_grp) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pt_mstr>() - .Property(e => e.xxqad_pt_promo) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pt_mstr>() - .Property(e => e.xxqad_pt_part_type) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pt_mstr>() - .Property(e => e.xxqad_pt_group) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pt_mstr>() - .Property(e => e.xxqad_pt_prod_line) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pt_mstr>() - .Property(e => e.xxqad_pt_status) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pt_mstr>() - .Property(e => e.xxqad_pt_qadread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pt_mstr>() - .Property(e => e.xxqad_pt_wmsread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pt_mstr>() - .Property(e => e.xxqad_pt_scmread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pt_mstr>() - .Property(e => e.xxqad_pt_mesread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pt_mstr>() - .Property(e => e.xxqad_pt_rmks) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pt_mstr>() - .Property(e => e.xxqad_pt_createur) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_pt_mstr>() - .Property(e => e.xxqad_pt_updateur) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sche_mstr>() - .Property(e => e.xxqad_sche_seq) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sche_mstr>() - .Property(e => e.xxqad_sche_part) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sche_mstr>() - .Property(e => e.xxqad_sche_custpart) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sche_mstr>() - .Property(e => e.xxqad_sche_domain) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sche_mstr>() - .Property(e => e.xxqad_sche_cust) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sche_mstr>() - .Property(e => e.xxqad_sche_name) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sche_mstr>() - .Property(e => e.xxqad_sche_desc) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sche_mstr>() - .Property(e => e.xxqad_sche_comment) - .HasPrecision(18, 5); - - modelBuilder.Entity<xxqad_sche_mstr>() - .Property(e => e.xxqad_sche_qadread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sche_mstr>() - .Property(e => e.xxqad_sche_wmsread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sche_mstr>() - .Property(e => e.xxqad_sche_scmread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sche_mstr>() - .Property(e => e.xxqad_sche_mesread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sche_mstr>() - .Property(e => e.xxqad_sche_rmks) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sche_mstr>() - .Property(e => e.xxqad_sche_createur) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sche_mstr>() - .Property(e => e.xxqad_sche_updateur) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sct_det>() - .Property(e => e.xxqad_sct_seq) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sct_det>() - .Property(e => e.xxqad_sct_site) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sct_det>() - .Property(e => e.xxqad_sct_part) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sct_det>() - .Property(e => e.xxqad_sct_domain) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sct_det>() - .Property(e => e.xxqad_sct_ref) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sct_det>() - .Property(e => e.xxqad_sct_cst_tot) - .HasPrecision(18, 5); - - modelBuilder.Entity<xxqad_sct_det>() - .Property(e => e.xxqad_sct_qadread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sct_det>() - .Property(e => e.xxqad_sct_wmsread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sct_det>() - .Property(e => e.xxqad_sct_scmread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sct_det>() - .Property(e => e.xxqad_sct_mesread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sct_det>() - .Property(e => e.xxqad_sct_rmks) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sct_det>() - .Property(e => e.xxqad_sct_createur) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sct_det>() - .Property(e => e.xxqad_sct_updateur) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sod_det>() - .Property(e => e.xxqad_sod_seq) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sod_det>() - .Property(e => e.xxqad_sod_order) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sod_det>() - .Property(e => e.xxqad_sod_domain) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sod_det>() - .Property(e => e.xxqad_sod_cust) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sod_det>() - .Property(e => e.xxqad_sod_part) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sod_det>() - .Property(e => e.xxqad_sod_desc) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sod_det>() - .Property(e => e.xxqad_sod_price) - .HasPrecision(18, 5); - - modelBuilder.Entity<xxqad_sod_det>() - .Property(e => e.xxqad_sod_shipto) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sod_det>() - .Property(e => e.xxqad_sod_um) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sod_det>() - .Property(e => e.xxqad_sod_site) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sod_det>() - .Property(e => e.xxqad_sod_pllist) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sod_det>() - .Property(e => e.xxqad_sod_loc) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sod_det>() - .Property(e => e.xxqad_sod_qty_std) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sod_det>() - .Property(e => e.xxqad_sod_qadread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sod_det>() - .Property(e => e.xxqad_sod_wmsread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sod_det>() - .Property(e => e.xxqad_sod_scmread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sod_det>() - .Property(e => e.xxqad_sod_mesread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sod_det>() - .Property(e => e.xxqad_sod_rmks) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sod_det>() - .Property(e => e.xxqad_sod_createur) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sod_det>() - .Property(e => e.xxqad_sod_updateur) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sprice_det>() - .Property(e => e.xxqad_sprice_seq) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sprice_det>() - .Property(e => e.xxqad_sprice_list) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sprice_det>() - .Property(e => e.xxqad_sprice_part) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sprice_det>() - .Property(e => e.xxqad_sprice_domain) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sprice_det>() - .Property(e => e.xxqad_sprice_curr) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sprice_det>() - .Property(e => e.xxqad_sprice_um) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sprice_det>() - .Property(e => e.xxqad_sprice_amt) - .HasPrecision(18, 5); - - modelBuilder.Entity<xxqad_sprice_det>() - .Property(e => e.xxqad_sprice_qadread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sprice_det>() - .Property(e => e.xxqad_sprice_wmsread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sprice_det>() - .Property(e => e.xxqad_sprice_scmread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sprice_det>() - .Property(e => e.xxqad_sprice_mesread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sprice_det>() - .Property(e => e.xxqad_sprice_rmks) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sprice_det>() - .Property(e => e.xxqad_sprice_createur) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_sprice_det>() - .Property(e => e.xxqad_sprice_updateur) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_vd_mstr>() - .Property(e => e.xxqad_vd_seq) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_vd_mstr>() - .Property(e => e.xxqad_vd_addr) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_vd_mstr>() - .Property(e => e.xxqad_vd_domain) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_vd_mstr>() - .Property(e => e.xxqad_vd_name) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_vd_mstr>() - .Property(e => e.xxqad_vd_line1) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_vd_mstr>() - .Property(e => e.xxqad_vd_line2) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_vd_mstr>() - .Property(e => e.xxqad_vd_line3) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_vd_mstr>() - .Property(e => e.xxqad_vd_country) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_vd_mstr>() - .Property(e => e.xxqad_vd_city) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_vd_mstr>() - .Property(e => e.xxqad_vd_phone) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_vd_mstr>() - .Property(e => e.xxqad_vd_fax) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_vd_mstr>() - .Property(e => e.xxqad_vd_pst_id) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_vd_mstr>() - .Property(e => e.xxqad_vd_attn) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_vd_mstr>() - .Property(e => e.xxqad_vd_curr) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_vd_mstr>() - .Property(e => e.xxqad_vd_promo) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_vd_mstr>() - .Property(e => e.xxqad_vd_type) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_vd_mstr>() - .Property(e => e.xxqad_vd_qadread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_vd_mstr>() - .Property(e => e.xxqad_vd_wmsread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_vd_mstr>() - .Property(e => e.xxqad_vd_scmread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_vd_mstr>() - .Property(e => e.xxqad_vd_mesread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_vd_mstr>() - .Property(e => e.xxqad_vd_rmks) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_vd_mstr>() - .Property(e => e.xxqad_vd_createur) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_vd_mstr>() - .Property(e => e.xxqad_vd_updateur) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_vp_mstr>() - .Property(e => e.xxqad_vp_seq) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_vp_mstr>() - .Property(e => e.xxqad_vp_addr) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_vp_mstr>() - .Property(e => e.xxqad_vp_part) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_vp_mstr>() - .Property(e => e.xxqad_vp_domain) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_vp_mstr>() - .Property(e => e.xxqad_vp_vend_part) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_vp_mstr>() - .Property(e => e.xxqad_vp_site) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_vp_mstr>() - .Property(e => e.xxqad_vp_comment) - .HasPrecision(18, 5); - - modelBuilder.Entity<xxqad_vp_mstr>() - .Property(e => e.xxqad_vp_qadread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_vp_mstr>() - .Property(e => e.xxqad_vp_wmsread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_vp_mstr>() - .Property(e => e.xxqad_vp_scmread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_vp_mstr>() - .Property(e => e.xxqad_vp_mesread) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_vp_mstr>() - .Property(e => e.xxqad_vp_rmks) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_vp_mstr>() - .Property(e => e.xxqad_vp_createur) - .IsUnicode(false); - - modelBuilder.Entity<xxqad_vp_mstr>() - .Property(e => e.xxqad_vp_updateur) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_ctrl>() - .Property(e => e.xxscm_seq) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_ctrl>() - .Property(e => e.xxscm_table) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_ctrl>() - .Property(e => e.xxscm_qad) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_ctrl>() - .Property(e => e.xxscm_mes) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_ctrl>() - .Property(e => e.xxscm_scm) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_ctrl>() - .Property(e => e.xxscm_wms) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_ctrl>() - .Property(e => e.xxscm_rmks) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_inv_det>() - .Property(e => e.xxscm_inv_seq) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_inv_det>() - .Property(e => e.xxscm_inv_nbr) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_inv_det>() - .Property(e => e.xxscm_inv_vend) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_inv_det>() - .Property(e => e.xxscm_inv_invoice) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_inv_det>() - .Property(e => e.xxscm_inv_curr) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_inv_det>() - .Property(e => e.xxscm_inv_order) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_inv_det>() - .Property(e => e.xxscm_inv_line) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_inv_det>() - .Property(e => e.xxscm_inv_receiver) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_inv_det>() - .Property(e => e.xxscm_inv_asn) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_inv_det>() - .Property(e => e.xxscm_inv_part) - .IsUnicode(false); - - - modelBuilder.Entity<xxscm_inv_det>() - .Property(e => e.xxscm_inv_qadread) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_inv_det>() - .Property(e => e.xxscm_inv_wmsread) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_inv_det>() - .Property(e => e.xxscm_inv_scmread) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_inv_det>() - .Property(e => e.xxscm_inv_mesread) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_inv_det>() - .Property(e => e.xxscm_inv_rmks) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_inv_det>() - .Property(e => e.xxscm_inv_createur) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_inv_det>() - .Property(e => e.xxscm_inv_updateur) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_pod_det>() - .Property(e => e.xxscm_pod_seq) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_pod_det>() - .Property(e => e.xxscm_pod_nbr) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_pod_det>() - .Property(e => e.xxscm_pod_modtype) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_pod_det>() - .Property(e => e.xxscm_pod_site) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_pod_det>() - .Property(e => e.xxscm_pod_domain) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_pod_det>() - .Property(e => e.xxscm_pod_part) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_pod_det>() - .Property(e => e.xxscm_pod_desc) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_pod_det>() - .Property(e => e.xxscm_pod_qty_ord) - .HasPrecision(18, 5); - - modelBuilder.Entity<xxscm_pod_det>() - .Property(e => e.xxscm_pod_qty_rct) - .HasPrecision(18, 5); - - modelBuilder.Entity<xxscm_pod_det>() - .Property(e => e.xxscm_pod_qty_std) - .HasPrecision(18, 5); - - modelBuilder.Entity<xxscm_pod_det>() - .Property(e => e.xxscm_pod_price) - .HasPrecision(18, 5); - - modelBuilder.Entity<xxscm_pod_det>() - .Property(e => e.xxscm_pod_curr) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_pod_det>() - .Property(e => e.xxscm_pod_loc_um) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_pod_det>() - .Property(e => e.xxscm_pod_um) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_pod_det>() - .Property(e => e.xxscm_pod_um_conv) - .HasPrecision(18, 5); - - modelBuilder.Entity<xxscm_pod_det>() - .Property(e => e.xxscm_pod_vend) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_pod_det>() - .Property(e => e.xxscm_pod_name) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_pod_det>() - .Property(e => e.xxscm_pod_attn) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_pod_det>() - .Property(e => e.xxscm_pod_ship) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_pod_det>() - .Property(e => e.xxscm_pod_made) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_pod_det>() - .Property(e => e.xxscm_pod_buyer) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_pod_det>() - .Property(e => e.xxscm_pod_buyer_phone) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_pod_det>() - .Property(e => e.xxscm_pod_status) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_pod_det>() - .Property(e => e.xxscm_pod_qadread) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_pod_det>() - .Property(e => e.xxscm_pod_wmsread) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_pod_det>() - .Property(e => e.xxscm_pod_scmread) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_pod_det>() - .Property(e => e.xxscm_pod_mesread) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_pod_det>() - .Property(e => e.xxscm_pod_rmks) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_pod_det>() - .Property(e => e.xxscm_pod_createur) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_pod_det>() - .Property(e => e.xxscm_pod_updateur) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_tx_det>() - .Property(e => e.xxscm_tx_seq) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_tx_det>() - .Property(e => e.xxscm_tx_boxcode) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_tx_det>() - .Property(e => e.xxscm_tx_nbr) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_tx_det>() - .Property(e => e.xxscm_tx_vend) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_tx_det>() - .Property(e => e.xxscm_tx_part) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_tx_det>() - .Property(e => e.xxscm_tx_batch) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_tx_det>() - .Property(e => e.xxscm_tx_qty_real) - .HasPrecision(18, 5); - - modelBuilder.Entity<xxscm_tx_det>() - .Property(e => e.xxscm_tx_qadread) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_tx_det>() - .Property(e => e.xxscm_tx_wmsread) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_tx_det>() - .Property(e => e.xxscm_tx_scmread) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_tx_det>() - .Property(e => e.xxscm_tx_mesread) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_tx_det>() - .Property(e => e.xxscm_tx_rmks) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_tx_det>() - .Property(e => e.xxscm_tx_createur) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_tx_det>() - .Property(e => e.xxscm_tx_updateur) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_tx_mstr>() - .Property(e => e.xxscm_tx_seq) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_tx_mstr>() - .Property(e => e.xxscm_tx_nbr) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_tx_mstr>() - .Property(e => e.xxscm_tx_po_nbr) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_tx_mstr>() - .Property(e => e.xxscm_tx_po_line) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_tx_mstr>() - .Property(e => e.xxscm_tx_part) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_tx_mstr>() - .Property(e => e.xxscm_tx_qty_total) - .HasPrecision(18, 5); - - modelBuilder.Entity<xxscm_tx_mstr>() - .Property(e => e.xxscm_tx_qty_std) - .HasPrecision(18, 5); - - modelBuilder.Entity<xxscm_tx_mstr>() - .Property(e => e.xxscm_tx_site) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_tx_mstr>() - .Property(e => e.xxscm_tx_vend) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_tx_mstr>() - .Property(e => e.xxscm_tx_ware_class) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_tx_mstr>() - .Property(e => e.xxscm_tx_ware) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_tx_mstr>() - .Property(e => e.xxscm_tx_pprice) - .HasPrecision(18, 5); - - modelBuilder.Entity<xxscm_tx_mstr>() - .Property(e => e.xxscm_tx_po_um) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_tx_mstr>() - .Property(e => e.xxscm_tx_loc_um) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_tx_mstr>() - .Property(e => e.xxscm_tx_conv) - .HasPrecision(18, 5); - - modelBuilder.Entity<xxscm_tx_mstr>() - .Property(e => e.xxscm_tx_type) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_tx_mstr>() - .Property(e => e.xxscm_tx_vend_batch) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_tx_mstr>() - .Property(e => e.xxscm_tx_qadread) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_tx_mstr>() - .Property(e => e.xxscm_tx_wmsread) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_tx_mstr>() - .Property(e => e.xxscm_tx_scmread) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_tx_mstr>() - .Property(e => e.xxscm_tx_mesread) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_tx_mstr>() - .Property(e => e.xxscm_tx_rmks) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_tx_mstr>() - .Property(e => e.xxscm_tx_createur) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_tx_mstr>() - .Property(e => e.xxscm_tx_updateur) - .IsUnicode(false); - - modelBuilder.Entity<xxscm_tx_mstr>() - .Property(e => e.xxscm_tx_status) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_bk_mstr>() - .Property(e => e.xxwms_bk_seq) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_bk_mstr>() - .Property(e => e.xxwms_bk_nbr) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_bk_mstr>() - .Property(e => e.xxwms_bk_part) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_bk_mstr>() - .Property(e => e.xxwms_bk_site) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_bk_mstr>() - .Property(e => e.xxwms_bk_line) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_bk_mstr>() - .Property(e => e.xxwms_bk_lot) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_bk_mstr>() - .Property(e => e.xxwms_bk_qty) - .HasPrecision(18, 5); - - modelBuilder.Entity<xxwms_bk_mstr>() - .Property(e => e.xxwms_bk_loc) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_bk_mstr>() - .Property(e => e.xxwms_bk_um) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_bk_mstr>() - .Property(e => e.xxwms_bk_qadread) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_bk_mstr>() - .Property(e => e.xxwms_bk_wmsread) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_bk_mstr>() - .Property(e => e.xxwms_bk_scmread) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_bk_mstr>() - .Property(e => e.xxwms_bk_mesread) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_bk_mstr>() - .Property(e => e.xxwms_bk_rmks) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_bk_mstr>() - .Property(e => e.xxwms_bk_createur) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_bk_mstr>() - .Property(e => e.xxwms_bk_updateur) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_ctrl>() - .Property(e => e.xxwms_seq) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_ctrl>() - .Property(e => e.xxwms_table) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_ctrl>() - .Property(e => e.xxwms_qad) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_ctrl>() - .Property(e => e.xxwms_mes) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_ctrl>() - .Property(e => e.xxwms_scm) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_ctrl>() - .Property(e => e.xxwms_wms) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_ctrl>() - .Property(e => e.xxwms_rmks) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_iss_det>() - .Property(e => e.xxwms_iss_seq) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_iss_det>() - .Property(e => e.xxwms_iss_nbr) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_iss_det>() - .Property(e => e.xxwms_iss_site) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_iss_det>() - .Property(e => e.xxwms_iss_part) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_iss_det>() - .Property(e => e.xxwms_iss_lot) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_iss_det>() - .Property(e => e.xxwms_iss_qty) - .HasPrecision(18, 5); - - modelBuilder.Entity<xxwms_iss_det>() - .Property(e => e.xxwms_iss_loc) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_iss_det>() - .Property(e => e.xxwms_iss_um) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_iss_det>() - .Property(e => e.xxwms_iss_reason) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_iss_det>() - .Property(e => e.xxwms_iss_qadread) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_iss_det>() - .Property(e => e.xxwms_iss_wmsread) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_iss_det>() - .Property(e => e.xxwms_iss_scmread) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_iss_det>() - .Property(e => e.xxwms_iss_mesread) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_iss_det>() - .Property(e => e.xxwms_iss_rmks) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_iss_det>() - .Property(e => e.xxwms_iss_createur) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_iss_det>() - .Property(e => e.xxwms_iss_updateur) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_ld_det>() - .Property(e => e.xxwms_ld_seq) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_ld_det>() - .Property(e => e.xxwms_ld_site) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_ld_det>() - .Property(e => e.xxwms_ld_part) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_ld_det>() - .Property(e => e.xxwms_ld_vend) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_ld_det>() - .Property(e => e.xxwms_ld_loc) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_ld_det>() - .Property(e => e.xxwms_ld_lot) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_ld_det>() - .Property(e => e.xxwms_ld_vend_batch) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_ld_det>() - .Property(e => e.xxwms_ld_qty) - .HasPrecision(18, 5); - - modelBuilder.Entity<xxwms_ld_det>() - .Property(e => e.xxwms_ld_um) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_ld_det>() - .Property(e => e.xxwms_ld_qadread) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_ld_det>() - .Property(e => e.xxwms_ld_wmsread) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_ld_det>() - .Property(e => e.xxwms_ld_scmread) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_ld_det>() - .Property(e => e.xxwms_ld_mesread) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_ld_det>() - .Property(e => e.xxwms_ld_rmks) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_ld_det>() - .Property(e => e.xxwms_ld_createur) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_ld_det>() - .Property(e => e.xxwms_ld_updateur) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rc_det>() - .Property(e => e.xxwms_rc_seq) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rc_det>() - .Property(e => e.xxwms_rc_nbr) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rc_det>() - .Property(e => e.xxwms_rc_ps_nbr) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rc_det>() - .Property(e => e.xxwms_rc_po_nbr) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rc_det>() - .Property(e => e.xxwms_rc_part) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rc_det>() - .Property(e => e.xxwms_rc_qty_total) - .HasPrecision(18, 5); - - modelBuilder.Entity<xxwms_rc_det>() - .Property(e => e.xxwms_rc_site) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rc_det>() - .Property(e => e.xxwms_rc_vend) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rc_det>() - .Property(e => e.xxwms_rc_ware_class) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rc_det>() - .Property(e => e.xxwms_rc_ware) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rc_det>() - .Property(e => e.xxwms_rc_loc) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rc_det>() - .Property(e => e.xxwms_rc_po_um) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rc_det>() - .Property(e => e.xxwms_rc_loc_um) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rc_det>() - .Property(e => e.xxwms_rc_conv) - .HasPrecision(18, 5); - - modelBuilder.Entity<xxwms_rc_det>() - .Property(e => e.xxwms_rc_lot) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rc_det>() - .Property(e => e.xxwms_rc_vend_batch) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rc_det>() - .Property(e => e.xxwms_rc_qadread) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rc_det>() - .Property(e => e.xxwms_rc_wmsread) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rc_det>() - .Property(e => e.xxwms_rc_scmread) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rc_det>() - .Property(e => e.xxwms_rc_mesread) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rc_det>() - .Property(e => e.xxwms_rc_rmks) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rc_det>() - .Property(e => e.xxwms_rc_createur) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rc_det>() - .Property(e => e.xxwms_rc_updateur) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rct_det>() - .Property(e => e.xxwms_rct_seq) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rct_det>() - .Property(e => e.xxwms_rct_nbr) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rct_det>() - .Property(e => e.xxwms_rct_site) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rct_det>() - .Property(e => e.xxwms_rct_part) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rct_det>() - .Property(e => e.xxwms_rct_lot) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rct_det>() - .Property(e => e.xxwms_rct_qty) - .HasPrecision(18, 5); - - modelBuilder.Entity<xxwms_rct_det>() - .Property(e => e.xxwms_rct_loc) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rct_det>() - .Property(e => e.xxwms_rct_um) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rct_det>() - .Property(e => e.xxwms_rct_reason) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rct_det>() - .Property(e => e.xxwms_rct_qadread) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rct_det>() - .Property(e => e.xxwms_rct_wmsread) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rct_det>() - .Property(e => e.xxwms_rct_scmread) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rct_det>() - .Property(e => e.xxwms_rct_mesread) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rct_det>() - .Property(e => e.xxwms_rct_rmks) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rct_det>() - .Property(e => e.xxwms_rct_createur) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rct_det>() - .Property(e => e.xxwms_rct_updateur) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rt_det>() - .Property(e => e.xxwms_rt_seq) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rt_det>() - .Property(e => e.xxwms_rt_nbr) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rt_det>() - .Property(e => e.xxwms_rt_po_nbr) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rt_det>() - .Property(e => e.xxwms_rt_part) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rt_det>() - .Property(e => e.xxwms_rt_qty_total) - .HasPrecision(18, 5); - - modelBuilder.Entity<xxwms_rt_det>() - .Property(e => e.xxwms_rt_site) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rt_det>() - .Property(e => e.xxwms_rt_vend) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rt_det>() - .Property(e => e.xxwms_rt_ware_class) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rt_det>() - .Property(e => e.xxwms_rt_ware) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rt_det>() - .Property(e => e.xxwms_rt_loc) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rt_det>() - .Property(e => e.xxwms_rt_po_um) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rt_det>() - .Property(e => e.xxwms_rt_loc_um) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rt_det>() - .Property(e => e.xxwms_rt_conv) - .HasPrecision(18, 5); - - modelBuilder.Entity<xxwms_rt_det>() - .Property(e => e.xxwms_rt_lot) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rt_det>() - .Property(e => e.xxwms_rt_vend_batch) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rt_det>() - .Property(e => e.xxwms_rt_qadread) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rt_det>() - .Property(e => e.xxwms_rt_wmsread) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rt_det>() - .Property(e => e.xxwms_rt_scmread) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rt_det>() - .Property(e => e.xxwms_rt_mesread) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rt_det>() - .Property(e => e.xxwms_rt_rmks) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rt_det>() - .Property(e => e.xxwms_rt_createur) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_rt_det>() - .Property(e => e.xxwms_rt_updateur) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_soiss_det>() - .Property(e => e.xxwms_soiss_seq) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_soiss_det>() - .Property(e => e.xxwms_soiss_nbr) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_soiss_det>() - .Property(e => e.xxwms_soiss_order) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_soiss_det>() - .Property(e => e.xxwms_soiss_part) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_soiss_det>() - .Property(e => e.xxwms_soiss_loc) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_soiss_det>() - .Property(e => e.xxwms_soiss_qty) - .HasPrecision(18, 5); - - modelBuilder.Entity<xxwms_soiss_det>() - .Property(e => e.xxwms_soiss_lot) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_soiss_det>() - .Property(e => e.xxwms_soiss_site) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_soiss_det>() - .Property(e => e.xxwms_soiss_domain) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_soiss_det>() - .Property(e => e.xxwms_soiss_qadread) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_soiss_det>() - .Property(e => e.xxwms_soiss_wmsread) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_soiss_det>() - .Property(e => e.xxwms_soiss_scmread) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_soiss_det>() - .Property(e => e.xxwms_soiss_mesread) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_soiss_det>() - .Property(e => e.xxwms_soiss_rmks) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_soiss_det>() - .Property(e => e.xxwms_soiss_createur) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_soiss_det>() - .Property(e => e.xxwms_soiss_updateur) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_tag_det>() - .Property(e => e.xxwms_tag_seq) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_tag_det>() - .Property(e => e.xxwms_tag_nbr) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_tag_det>() - .Property(e => e.xxwms_tag_part) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_tag_det>() - .Property(e => e.xxwms_tag_loc) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_tag_det>() - .Property(e => e.xxwms_tag_lot) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_tag_det>() - .Property(e => e.xxwms_tag_var_qty) - .HasPrecision(18, 5); - - modelBuilder.Entity<xxwms_tag_det>() - .Property(e => e.xxwms_tag_site) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_tag_det>() - .Property(e => e.xxwms_tag_domain) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_tag_det>() - .Property(e => e.xxwms_tag_qadread) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_tag_det>() - .Property(e => e.xxwms_tag_wmsread) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_tag_det>() - .Property(e => e.xxwms_tag_scmread) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_tag_det>() - .Property(e => e.xxwms_tag_mesread) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_tag_det>() - .Property(e => e.xxwms_tag_rmks) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_tag_det>() - .Property(e => e.xxwms_tag_createur) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_tag_det>() - .Property(e => e.xxwms_tag_updateur) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_tr_det>() - .Property(e => e.xxwms_tr_seq) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_tr_det>() - .Property(e => e.xxwms_tr_nbr) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_tr_det>() - .Property(e => e.xxwms_tr_site) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_tr_det>() - .Property(e => e.xxwms_tr_part) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_tr_det>() - .Property(e => e.xxwms_tr_lot) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_tr_det>() - .Property(e => e.xxwms_tr_qty) - .HasPrecision(18, 5); - - modelBuilder.Entity<xxwms_tr_det>() - .Property(e => e.xxwms_tr_loc1) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_tr_det>() - .Property(e => e.xxwms_tr_loc2) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_tr_det>() - .Property(e => e.xxwms_tr_um) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_tr_det>() - .Property(e => e.xxwms_tr_qadread) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_tr_det>() - .Property(e => e.xxwms_tr_wmsread) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_tr_det>() - .Property(e => e.xxwms_tr_scmread) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_tr_det>() - .Property(e => e.xxwms_tr_mesread) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_tr_det>() - .Property(e => e.xxwms_tr_rmks) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_tr_det>() - .Property(e => e.xxwms_tr_createur) - .IsUnicode(false); - - modelBuilder.Entity<xxwms_tr_det>() - .Property(e => e.xxwms_tr_updateur) - .IsUnicode(false); - - } - } -} diff --git a/CK.SCP.Models/UniApiEntity/UniInterfaceExtention.cs b/CK.SCP.Models/UniApiEntity/UniInterfaceExtention.cs deleted file mode 100644 index e72f8bc..0000000 --- a/CK.SCP.Models/UniApiEntity/UniInterfaceExtention.cs +++ /dev/null @@ -1,729 +0,0 @@ -namespace CK.SCP.Models.UniApiEntity -{ - /* - /// <summary> - /// WMS系统控制主表 - /// </summary> - public partial class xxwms_ctrl : IControlTable - { - [NotMapped] public int UID { get { return xxwms_uid; } set { xxwms_uid = value; } } - [NotMapped] public string Seq { get { return xxwms_seq; } set { xxwms_seq = value; } } - [NotMapped] public string TableName { get { return xxwms_table; } set { xxwms_table = value; } } - [NotMapped] public int RowCount { get { return xxwms_table_qty; } set { xxwms_table_qty = value; } } - [NotMapped] public string QadRead { get { return xxwms_qad; } set { xxwms_qad = value; } } - [NotMapped] public string WmsRead { get { return xxwms_wms; } set { xxwms_wms = value; } } - [NotMapped] public string ScmRead { get { return xxwms_scm; } set { xxwms_scm = value; } } - [NotMapped] public string MesRead { get { return xxwms_mes; } set { xxwms_mes = value; } } - [NotMapped] public string Remark { get { return xxwms_rmks; } set { xxwms_rmks = value; } } - - public override string ToString() - { - - return EntitiesHelper.GetPropertiesString(this); - } - } - - /// <summary> - /// QAD系统控制主表 - /// </summary> - public partial class xxqad_ctrl : IControlTable - { - [NotMapped] public int UID { get { return xxqad_uid; } set { xxqad_uid = value; } } - - [NotMapped] public string Seq { get { return xxqad_seq; } set { xxqad_seq = value; } } - [NotMapped] public string TableName { get { return xxqad_table; } set { xxqad_table = value; } } - [NotMapped] public int RowCount { get { return xxqad_table_qty; } set { xxqad_table_qty = value; } } - [NotMapped] public string QadRead { get { return xxqad_qad; } set { xxqad_qad = value; } } - [NotMapped] public string WmsRead { get { return xxqad_wms; } set { xxqad_wms = value; } } - [NotMapped] public string ScmRead { get { return xxqad_scm; } set { xxqad_scm = value; } } - [NotMapped] public string MesRead { get { return xxqad_mes; } set { xxqad_mes = value; } } - [NotMapped] public string Remark { get { return xxqad_rmks; } set { xxqad_rmks = value; } } - - public override string ToString() - { - - return EntitiesHelper.GetPropertiesString(this); - } - - } - - /// <summary> - /// SCM系统控制主表 - /// </summary> - public partial class xxscm_ctrl : IControlTable - { - [NotMapped] public int UID { get { return xxscm_uid; } set { xxscm_uid = value; } } - - [NotMapped] public string Seq { get { return xxscm_seq; } set { xxscm_seq = value; } } - [NotMapped] public string TableName { get { return xxscm_table; } set { xxscm_table = value; } } - [NotMapped] public int RowCount { get { return xxscm_table_qty; } set { xxscm_table_qty = value; } } - [NotMapped] public string QadRead { get { return xxscm_qad; } set { xxscm_qad = value; } } - [NotMapped] public string WmsRead { get { return xxscm_wms; } set { xxscm_wms = value; } } - [NotMapped] public string ScmRead { get { return xxscm_scm; } set { xxscm_scm = value; } } - [NotMapped] public string MesRead { get { return xxscm_mes; } set { xxscm_mes = value; } } - [NotMapped] public string Remark { get { return xxscm_rmks; } set { xxscm_rmks = value; } } - - public override string ToString() - { - - return EntitiesHelper.GetPropertiesString(this); - } - } - */ - - /// <summary> - /// 物料信息 from QAD - /// </summary> - public partial class xxqad_pt_mstr - { -// [NotMapped] public int UID { get { return xxqad_pt_uid; } set { xxqad_pt_uid = value; } } -// -// [NotMapped] public string Seq { get { return xxqad_pt_seq; } set { xxqad_pt_seq = value; } } -// [NotMapped] public string QadRead { get { return xxqad_pt_qadread; } set { xxqad_pt_qadread = value; } } -// [NotMapped] public string WmsRead { get { return xxqad_pt_wmsread; } set { xxqad_pt_wmsread = value; } } -// [NotMapped] public string ScmRead { get { return xxqad_pt_scmread; } set { xxqad_pt_scmread = value; } } -// [NotMapped] public string MesRead { get { return xxqad_pt_mesread; } set { xxqad_pt_mesread = value; } } -// [NotMapped] public string Remark { get { return xxqad_pt_rmks; } set { xxqad_pt_rmks = value; } } -// -// [NotMapped] public DateTime? CreateTime { get { return xxqad_pt_createdt; } set { xxqad_pt_createdt = value; } } -// [NotMapped] public string CreateUser { get { return xxqad_pt_createur; } set { xxqad_pt_createur = value; } } -// [NotMapped] public DateTime? UpdateTime { get { return xxqad_pt_updatedt; } set { xxqad_pt_updatedt = value; } } -// [NotMapped] public string UpdateUser { get { return xxqad_pt_updateur; } set { xxqad_pt_updateur = value; } } - - public override string ToString() - { - return EntitiesHelper.GetPropertiesString(this); - } - } - - /// <summary> - /// 供应商信息 from QAD - /// </summary> - public partial class xxqad_vd_mstr - { -// [NotMapped] public int UID { get { return xxqad_vd_uid; } set { xxqad_vd_uid = value; } } -// -// [NotMapped] public string Seq { get { return xxqad_vd_seq; } set { xxqad_vd_seq = value; } } -// [NotMapped] public string QadRead { get { return xxqad_vd_qadread; } set { xxqad_vd_qadread = value; } } -// [NotMapped] public string WmsRead { get { return xxqad_vd_wmsread; } set { xxqad_vd_wmsread = value; } } -// [NotMapped] public string ScmRead { get { return xxqad_vd_scmread; } set { xxqad_vd_scmread = value; } } -// [NotMapped] public string MesRead { get { return xxqad_vd_mesread; } set { xxqad_vd_mesread = value; } } -// [NotMapped] public string Remark { get { return xxqad_vd_rmks; } set { xxqad_vd_rmks = value; } } -// -// [NotMapped] public DateTime? CreateTime { get { return xxqad_vd_createdt; } set { xxqad_vd_createdt = value; } } -// [NotMapped] public string CreateUser { get { return xxqad_vd_createur; } set { xxqad_vd_createur = value; } } -// [NotMapped] public DateTime? UpdateTime { get { return xxqad_vd_updatedt; } set { xxqad_vd_updatedt = value; } } -// [NotMapped] public string UpdateUser { get { return xxqad_vd_updateur; } set { xxqad_vd_updateur = value; } } - - public override string ToString() - { - - return EntitiesHelper.GetPropertiesString(this); - } - } - - /// <summary> - /// 客户信息 from QAD - /// </summary> - public partial class xxqad_cm_mstr - { -// [NotMapped] public int UID { get { return xxqad_cm_uid; } set { xxqad_cm_uid = value; } } -// -// [NotMapped] public string Seq { get { return xxqad_cm_seq; } set { xxqad_cm_seq = value; } } -// [NotMapped] public string QadRead { get { return xxqad_cm_qadread; } set { xxqad_cm_qadread = value; } } -// [NotMapped] public string WmsRead { get { return xxqad_cm_wmsread; } set { xxqad_cm_wmsread = value; } } -// [NotMapped] public string ScmRead { get { return xxqad_cm_scmread; } set { xxqad_cm_scmread = value; } } -// [NotMapped] public string MesRead { get { return xxqad_cm_mesread; } set { xxqad_cm_mesread = value; } } -// [NotMapped] public string Remark { get { return xxqad_cm_rmks; } set { xxqad_cm_rmks = value; } } -// -// [NotMapped] public DateTime? CreateTime { get { return xxqad_cm_createdt; } set { xxqad_cm_createdt = value; } } -// [NotMapped] public string CreateUser { get { return xxqad_cm_createur; } set { xxqad_cm_createur = value; } } -// [NotMapped] public DateTime? UpdateTime { get { return xxqad_cm_updatedt; } set { xxqad_cm_updatedt = value; } } -// [NotMapped] public string UpdateUser { get { return xxqad_cm_updateur; } set { xxqad_cm_updateur = value; } } - public override string ToString() - { - - return EntitiesHelper.GetPropertiesString(this); - } - } - - /// <summary> - /// 供应商物料信息 from QAD - /// </summary> - public partial class xxqad_vp_mstr - { -// [NotMapped] public int UID { get { return xxqad_vp_uid; } set { xxqad_vp_uid = value; } } -// -// [NotMapped] public string Seq { get { return xxqad_vp_seq; } set { xxqad_vp_seq = value; } } -// [NotMapped] public string QadRead { get { return xxqad_vp_qadread; } set { xxqad_vp_qadread = value; } } -// [NotMapped] public string WmsRead { get { return xxqad_vp_wmsread; } set { xxqad_vp_wmsread = value; } } -// [NotMapped] public string ScmRead { get { return xxqad_vp_scmread; } set { xxqad_vp_scmread = value; } } -// [NotMapped] public string MesRead { get { return xxqad_vp_mesread; } set { xxqad_vp_mesread = value; } } -// [NotMapped] public string Remark { get { return xxqad_vp_rmks; } set { xxqad_vp_rmks = value; } } -// -// [NotMapped] public DateTime? CreateTime { get { return xxqad_vp_createdt; } set { xxqad_vp_createdt = value; } } -// [NotMapped] public string CreateUser { get { return xxqad_vp_createur; } set { xxqad_vp_createur = value; } } -// [NotMapped] public DateTime? UpdateTime { get { return xxqad_vp_updatedt; } set { xxqad_vp_updatedt = value; } } -// [NotMapped] public string UpdateUser { get { return xxqad_vp_updateur; } set { xxqad_vp_updateur = value; } } - public override string ToString() - { - - return EntitiesHelper.GetPropertiesString(this); - } - } - - - /// <summary> - /// 供应商物料信息 from QAD - /// </summary> - public partial class xxqad_sche_mstr - { -// [NotMapped] public int UID { get { return xxqad_sche_uid; } set { xxqad_sche_uid = value; } } -// -// [NotMapped] public string Seq { get { return xxqad_sche_seq; } set { xxqad_sche_seq = value; } } -// [NotMapped] public string QadRead { get { return xxqad_sche_qadread; } set { xxqad_sche_qadread = value; } } -// [NotMapped] public string WmsRead { get { return xxqad_sche_wmsread; } set { xxqad_sche_wmsread = value; } } -// [NotMapped] public string ScmRead { get { return xxqad_sche_scmread; } set { xxqad_sche_scmread = value; } } -// [NotMapped] public string MesRead { get { return xxqad_sche_mesread; } set { xxqad_sche_mesread = value; } } -// [NotMapped] public string Remark { get { return xxqad_sche_rmks; } set { xxqad_sche_rmks = value; } } -// -// [NotMapped] public DateTime? CreateTime { get { return xxqad_sche_createdt; } set { xxqad_sche_createdt = value; } } -// [NotMapped] public string CreateUser { get { return xxqad_sche_createur; } set { xxqad_sche_createur = value; } } -// [NotMapped] public DateTime? UpdateTime { get { return xxqad_sche_updatedt; } set { xxqad_sche_updatedt = value; } } -// [NotMapped] public string UpdateUser { get { return xxqad_sche_updateur; } set { xxqad_sche_updateur = value; } } - public override string ToString() - { - - return EntitiesHelper.GetPropertiesString(this); - } - } - - /// <summary> - /// 采购价格信息 from QAD - /// </summary> - public partial class xxqad_pprice_det - { -// [NotMapped] public int UID { get { return xxqad_pprice_uid; } set { xxqad_pprice_uid = value; } } -// -// [NotMapped] public string Seq { get { return xxqad_pprice_seq; } set { xxqad_pprice_seq = value; } } -// [NotMapped] public string QadRead { get { return xxqad_pprice_qadread; } set { xxqad_pprice_qadread = value; } } -// [NotMapped] public string WmsRead { get { return xxqad_pprice_wmsread; } set { xxqad_pprice_wmsread = value; } } -// [NotMapped] public string ScmRead { get { return xxqad_pprice_scmread; } set { xxqad_pprice_scmread = value; } } -// [NotMapped] public string MesRead { get { return xxqad_pprice_mesread; } set { xxqad_pprice_mesread = value; } } -// [NotMapped] public string Remark { get { return xxqad_pprice_rmks; } set { xxqad_pprice_rmks = value; } } -// -// [NotMapped] public DateTime? CreateTime { get { return xxqad_pprice_createdt; } set { xxqad_pprice_createdt = value; } } -// [NotMapped] public string CreateUser { get { return xxqad_pprice_createur; } set { xxqad_pprice_createur = value; } } -// [NotMapped] public DateTime? UpdateTime { get { return xxqad_pprice_updatedt; } set { xxqad_pprice_updatedt = value; } } -// [NotMapped] public string UpdateUser { get { return xxqad_pprice_updateur; } set { xxqad_pprice_updateur = value; } } - public override string ToString() - { - - return EntitiesHelper.GetPropertiesString(this); - } - } - - /// <summary> - /// 销售价格信息 from QAD - /// </summary> - public partial class xxqad_sprice_det - { -// [NotMapped] public int UID { get { return xxqad_sprice_uid; } set { xxqad_sprice_uid = value; } } -// -// [NotMapped] public string Seq { get { return xxqad_sprice_seq; } set { xxqad_sprice_seq = value; } } -// [NotMapped] public string QadRead { get { return xxqad_sprice_qadread; } set { xxqad_sprice_qadread = value; } } -// [NotMapped] public string WmsRead { get { return xxqad_sprice_wmsread; } set { xxqad_sprice_wmsread = value; } } -// [NotMapped] public string ScmRead { get { return xxqad_sprice_scmread; } set { xxqad_sprice_scmread = value; } } -// [NotMapped] public string MesRead { get { return xxqad_sprice_mesread; } set { xxqad_sprice_mesread = value; } } -// [NotMapped] public string Remark { get { return xxqad_sprice_rmks; } set { xxqad_sprice_rmks = value; } } -// -// [NotMapped] public DateTime? CreateTime { get { return xxqad_sprice_createdt; } set { xxqad_sprice_createdt = value; } } -// [NotMapped] public string CreateUser { get { return xxqad_sprice_createur; } set { xxqad_sprice_createur = value; } } -// [NotMapped] public DateTime? UpdateTime { get { return xxqad_sprice_updatedt; } set { xxqad_sprice_updatedt = value; } } -// [NotMapped] public string UpdateUser { get { return xxqad_sprice_updateur; } set { xxqad_sprice_updateur = value; } } - public override string ToString() - { - - return EntitiesHelper.GetPropertiesString(this); - } - } - - /// <summary> - /// 采购订单信息 from QAD - /// </summary> - public partial class xxqad_pod_det - { -// [NotMapped] public int UID { get { return xxqad_pod_uid; } set { xxqad_pod_uid = value; } } -// -// [NotMapped] public string Seq { get { return xxqad_pod_seq; } set { xxqad_pod_seq = value; } } -// [NotMapped] public string QadRead { get { return xxqad_pod_qadread; } set { xxqad_pod_qadread = value; } } -// [NotMapped] public string WmsRead { get { return xxqad_pod_wmsread; } set { xxqad_pod_wmsread = value; } } -// [NotMapped] public string ScmRead { get { return xxqad_pod_scmread; } set { xxqad_pod_scmread = value; } } -// [NotMapped] public string MesRead { get { return xxqad_pod_mesread; } set { xxqad_pod_mesread = value; } } -// [NotMapped] public string Remark { get { return xxqad_pod_rmks; } set { xxqad_pod_rmks = value; } } -// -// [NotMapped] public DateTime? CreateTime { get { return xxqad_pod_createdt; } set { xxqad_pod_createdt = value; } } -// [NotMapped] public string CreateUser { get { return xxqad_pod_createur; } set { xxqad_pod_createur = value; } } -// [NotMapped] public DateTime? UpdateTime { get { return xxqad_pod_updatedt; } set { xxqad_pod_updatedt = value; } } -// [NotMapped] public string UpdateUser { get { return xxqad_pod_updateur; } set { xxqad_pod_updateur = value; } } - public override string ToString() - { - - return EntitiesHelper.GetPropertiesString(this); - } - } - - - /// <summary> - /// 销售订单信息 from QAD - /// </summary> - public partial class xxqad_sod_det - { -// [NotMapped] public int UID { get { return xxqad_sod_uid; } set { xxqad_sod_uid = value; } } -// -// [NotMapped] public string Seq { get { return xxqad_sod_seq; } set { xxqad_sod_seq = value; } } -// [NotMapped] public string QadRead { get { return xxqad_sod_qadread; } set { xxqad_sod_qadread = value; } } -// [NotMapped] public string WmsRead { get { return xxqad_sod_wmsread; } set { xxqad_sod_wmsread = value; } } -// [NotMapped] public string ScmRead { get { return xxqad_sod_scmread; } set { xxqad_sod_scmread = value; } } -// [NotMapped] public string MesRead { get { return xxqad_sod_mesread; } set { xxqad_sod_mesread = value; } } -// [NotMapped] public string Remark { get { return xxqad_sod_rmks; } set { xxqad_sod_rmks = value; } } -// -// [NotMapped] public DateTime? CreateTime { get { return xxqad_sod_createdt; } set { xxqad_sod_createdt = value; } } -// [NotMapped] public string CreateUser { get { return xxqad_sod_createur; } set { xxqad_sod_createur = value; } } -// [NotMapped] public DateTime? UpdateTime { get { return xxqad_sod_updatedt; } set { xxqad_sod_updatedt = value; } } -// [NotMapped] public string UpdateUser { get { return xxqad_sod_updateur; } set { xxqad_sod_updateur = value; } } - public override string ToString() - { - - return EntitiesHelper.GetPropertiesString(this); - } - } - - /// <summary> - /// 库位信息 from QAD - /// </summary> - public partial class xxqad_loc_det - { -// [NotMapped] public int UID { get { return xxqad_loc_uid; } set { xxqad_loc_uid = value; } } -// -// [NotMapped] public string Seq { get { return xxqad_loc_seq; } set { xxqad_loc_seq = value; } } -// [NotMapped] public string QadRead { get { return xxqad_loc_qadread; } set { xxqad_loc_qadread = value; } } -// [NotMapped] public string WmsRead { get { return xxqad_loc_wmsread; } set { xxqad_loc_wmsread = value; } } -// [NotMapped] public string ScmRead { get { return xxqad_loc_scmread; } set { xxqad_loc_scmread = value; } } -// [NotMapped] public string MesRead { get { return xxqad_loc_mesread; } set { xxqad_loc_mesread = value; } } -// [NotMapped] public string Remark { get { return xxqad_loc_rmks; } set { xxqad_loc_rmks = value; } } -// -// [NotMapped] public DateTime? CreateTime { get { return xxqad_loc_createdt; } set { xxqad_loc_createdt = value; } } -// [NotMapped] public string CreateUser { get { return xxqad_loc_createur; } set { xxqad_loc_createur = value; } } -// [NotMapped] public DateTime? UpdateTime { get { return xxqad_loc_updatedt; } set { xxqad_loc_updatedt = value; } } -// [NotMapped] public string UpdateUser { get { return xxqad_loc_updateur; } set { xxqad_loc_updateur = value; } } - public override string ToString() - { - - return EntitiesHelper.GetPropertiesString(this); - } - } - - /// <summary> - /// 实时库存信息 from QAD - /// </summary> - public partial class xxqad_ld_det - { -// [NotMapped] public int UID { get { return xxqad_ld_uid; } set { xxqad_ld_uid = value; } } -// -// [NotMapped] public string Seq { get { return xxqad_ld_seq; } set { xxqad_ld_seq = value; } } -// [NotMapped] public string QadRead { get { return xxqad_ld_qadread; } set { xxqad_ld_qadread = value; } } -// [NotMapped] public string WmsRead { get { return xxqad_ld_wmsread; } set { xxqad_ld_wmsread = value; } } -// [NotMapped] public string ScmRead { get { return xxqad_ld_scmread; } set { xxqad_ld_scmread = value; } } -// [NotMapped] public string MesRead { get { return xxqad_ld_mesread; } set { xxqad_ld_mesread = value; } } -// [NotMapped] public string Remark { get { return xxqad_ld_rmks; } set { xxqad_ld_rmks = value; } } -// -// [NotMapped] public DateTime? CreateTime { get { return xxqad_ld_createdt; } set { xxqad_ld_createdt = value; } } -// [NotMapped] public string CreateUser { get { return xxqad_ld_createur; } set { xxqad_ld_createur = value; } } -// [NotMapped] public DateTime? UpdateTime { get { return xxqad_ld_updatedt; } set { xxqad_ld_updatedt = value; } } -// [NotMapped] public string UpdateUser { get { return xxqad_ld_updateur; } set { xxqad_ld_updateur = value; } } - public override string ToString() - { - - return EntitiesHelper.GetPropertiesString(this); - } - } - - /// <summary> - /// BOM信息 from QAD - /// </summary> - public partial class xxqad_ps_mstr - { -// [NotMapped] public int UID { get { return xxqad_ps_uid; } set { xxqad_ps_uid = value; } } -// -// [NotMapped] public string Seq { get { return xxqad_ps_seq; } set { xxqad_ps_seq = value; } } -// [NotMapped] public string QadRead { get { return xxqad_ps_qadread; } set { xxqad_ps_qadread = value; } } -// [NotMapped] public string WmsRead { get { return xxqad_ps_wmsread; } set { xxqad_ps_wmsread = value; } } -// [NotMapped] public string ScmRead { get { return xxqad_ps_scmread; } set { xxqad_ps_scmread = value; } } -// [NotMapped] public string MesRead { get { return xxqad_ps_mesread; } set { xxqad_ps_mesread = value; } } -// [NotMapped] public string Remark { get { return xxqad_ps_rmks; } set { xxqad_ps_rmks = value; } } -// -// [NotMapped] public DateTime? CreateTime { get { return xxqad_ps_createdt; } set { xxqad_ps_createdt = value; } } -// [NotMapped] public string CreateUser { get { return xxqad_ps_createur; } set { xxqad_ps_createur = value; } } -// [NotMapped] public DateTime? UpdateTime { get { return xxqad_ps_updatedt; } set { xxqad_ps_updatedt = value; } } -// [NotMapped] public string UpdateUser { get { return xxqad_ps_updateur; } set { xxqad_ps_updateur = value; } } - public override string ToString() - { - - return EntitiesHelper.GetPropertiesString(this); - } - } - - /// <summary> - /// 标准成本信息 from QAD - /// </summary> - public partial class xxqad_sct_det - { -// [NotMapped] public int UID { get { return xxqad_sct_uid; } set { xxqad_sct_uid = value; } } -// -// [NotMapped] public string Seq { get { return xxqad_sct_seq; } set { xxqad_sct_seq = value; } } -// [NotMapped] public string QadRead { get { return xxqad_sct_qadread; } set { xxqad_sct_qadread = value; } } -// [NotMapped] public string WmsRead { get { return xxqad_sct_wmsread; } set { xxqad_sct_wmsread = value; } } -// [NotMapped] public string ScmRead { get { return xxqad_sct_scmread; } set { xxqad_sct_scmread = value; } } -// [NotMapped] public string MesRead { get { return xxqad_sct_mesread; } set { xxqad_sct_mesread = value; } } -// [NotMapped] public string Remark { get { return xxqad_sct_rmks; } set { xxqad_sct_rmks = value; } } -// -// [NotMapped] public DateTime? CreateTime { get { return xxqad_sct_createdt; } set { xxqad_sct_createdt = value; } } -// [NotMapped] public string CreateUser { get { return xxqad_sct_createur; } set { xxqad_sct_createur = value; } } -// [NotMapped] public DateTime? UpdateTime { get { return xxqad_sct_updatedt; } set { xxqad_sct_updatedt = value; } } -// [NotMapped] public string UpdateUser { get { return xxqad_sct_updateur; } set { xxqad_sct_updateur = value; } } - public override string ToString() - { - - return EntitiesHelper.GetPropertiesString(this); - } - } - - /// <summary> - /// 库存转移 from WMS - /// </summary> - public partial class xxwms_tr_det - { -// [NotMapped] public int UID { get { return xxwms_tr_uid; } set { xxwms_tr_uid = value; } } -// -// [NotMapped] public string Seq { get { return xxwms_tr_seq; } set { xxwms_tr_seq = value; } } -// [NotMapped] public string QadRead { get { return xxwms_tr_qadread; } set { xxwms_tr_qadread = value; } } -// [NotMapped] public string WmsRead { get { return xxwms_tr_wmsread; } set { xxwms_tr_wmsread = value; } } -// [NotMapped] public string ScmRead { get { return xxwms_tr_scmread; } set { xxwms_tr_scmread = value; } } -// [NotMapped] public string MesRead { get { return xxwms_tr_mesread; } set { xxwms_tr_mesread = value; } } -// [NotMapped] public string Remark { get { return xxwms_tr_rmks; } set { xxwms_tr_rmks = value; } } -// -// [NotMapped] public DateTime? CreateTime { get { return xxwms_tr_createdt; } set { xxwms_tr_createdt = value; } } -// [NotMapped] public string CreateUser { get { return xxwms_tr_createur; } set { xxwms_tr_createur = value; } } -// [NotMapped] public DateTime? UpdateTime { get { return xxwms_tr_updatedt; } set { xxwms_tr_updatedt = value; } } -// [NotMapped] public string UpdateUser { get { return xxwms_tr_updateur; } set { xxwms_tr_updateur = value; } } - public override string ToString() - { - - return EntitiesHelper.GetPropertiesString(this); - } - } - - /// <summary> - /// 采购入库 from WMS - /// </summary> - public partial class xxwms_rc_det - { -// [NotMapped] public int UID { get { return xxwms_rc_uid; } set { xxwms_rc_uid = value; } } -// -// [NotMapped] public string Seq { get { return xxwms_rc_seq; } set { xxwms_rc_seq = value; } } -// [NotMapped] public string QadRead { get { return xxwms_rc_qadread; } set { xxwms_rc_qadread = value; } } -// [NotMapped] public string WmsRead { get { return xxwms_rc_wmsread; } set { xxwms_rc_wmsread = value; } } -// [NotMapped] public string ScmRead { get { return xxwms_rc_scmread; } set { xxwms_rc_scmread = value; } } -// [NotMapped] public string MesRead { get { return xxwms_rc_mesread; } set { xxwms_rc_mesread = value; } } -// [NotMapped] public string Remark { get { return xxwms_rc_rmks; } set { xxwms_rc_rmks = value; } } -// -// [NotMapped] public DateTime? CreateTime { get { return xxwms_rc_createdt; } set { xxwms_rc_createdt = value; } } -// [NotMapped] public string CreateUser { get { return xxwms_rc_createur; } set { xxwms_rc_createur = value; } } -// [NotMapped] public DateTime? UpdateTime { get { return xxwms_rc_updatedt; } set { xxwms_rc_updatedt = value; } } -// [NotMapped] public string UpdateUser { get { return xxwms_rc_updateur; } set { xxwms_rc_updateur = value; } } - public override string ToString() - { - - return EntitiesHelper.GetPropertiesString(this); - } - } - - /// <summary> - /// 采购退货 from WMS - /// </summary> - public partial class xxwms_rt_det - { -// [NotMapped] public int UID { get { return xxwms_rt_uid; } set { xxwms_rt_uid = value; } } -// -// [NotMapped] public string Seq { get { return xxwms_rt_seq; } set { xxwms_rt_seq = value; } } -// [NotMapped] public string QadRead { get { return xxwms_rt_qadread; } set { xxwms_rt_qadread = value; } } -// [NotMapped] public string WmsRead { get { return xxwms_rt_wmsread; } set { xxwms_rt_wmsread = value; } } -// [NotMapped] public string ScmRead { get { return xxwms_rt_scmread; } set { xxwms_rt_scmread = value; } } -// [NotMapped] public string MesRead { get { return xxwms_rt_mesread; } set { xxwms_rt_mesread = value; } } -// [NotMapped] public string Remark { get { return xxwms_rt_rmks; } set { xxwms_rt_rmks = value; } } -// -// [NotMapped] public DateTime? CreateTime { get { return xxwms_rt_createdt; } set { xxwms_rt_createdt = value; } } -// [NotMapped] public string CreateUser { get { return xxwms_rt_createur; } set { xxwms_rt_createur = value; } } -// [NotMapped] public DateTime? UpdateTime { get { return xxwms_rt_updatedt; } set { xxwms_rt_updatedt = value; } } -// [NotMapped] public string UpdateUser { get { return xxwms_rt_updateur; } set { xxwms_rt_updateur = value; } } - public override string ToString() - { - - return EntitiesHelper.GetPropertiesString(this); - } - } - - /// <summary> - /// 库存明细带批次 from WMS - /// </summary> - public partial class xxwms_ld_det - { -// [NotMapped] public int UID { get { return xxwms_ld_uid; } set { xxwms_ld_uid = value; } } -// -// [NotMapped] public string Seq { get { return xxwms_ld_seq; } set { xxwms_ld_seq = value; } } -// [NotMapped] public string QadRead { get { return xxwms_ld_qadread; } set { xxwms_ld_qadread = value; } } -// [NotMapped] public string WmsRead { get { return xxwms_ld_wmsread; } set { xxwms_ld_wmsread = value; } } -// [NotMapped] public string ScmRead { get { return xxwms_ld_scmread; } set { xxwms_ld_scmread = value; } } -// [NotMapped] public string MesRead { get { return xxwms_ld_mesread; } set { xxwms_ld_mesread = value; } } -// [NotMapped] public string Remark { get { return xxwms_ld_rmks; } set { xxwms_ld_rmks = value; } } -// -// [NotMapped] public DateTime? CreateTime { get { return xxwms_ld_createdt; } set { xxwms_ld_createdt = value; } } -// [NotMapped] public string CreateUser { get { return xxwms_ld_createur; } set { xxwms_ld_createur = value; } } -// [NotMapped] public DateTime? UpdateTime { get { return xxwms_ld_updatedt; } set { xxwms_ld_updatedt = value; } } -// [NotMapped] public string UpdateUser { get { return xxwms_ld_updateur; } set { xxwms_ld_updateur = value; } } - public override string ToString() - { - - return EntitiesHelper.GetPropertiesString(this); - } - } - - /// <summary> - /// 生产回冲 from WMS - /// </summary> - public partial class xxwms_bk_mstr - { -// [NotMapped] public int UID { get { return xxwms_bk_uid; } set { xxwms_bk_uid = value; } } -// -// [NotMapped] public string Seq { get { return xxwms_bk_seq; } set { xxwms_bk_seq = value; } } -// [NotMapped] public string QadRead { get { return xxwms_bk_qadread; } set { xxwms_bk_qadread = value; } } -// [NotMapped] public string WmsRead { get { return xxwms_bk_wmsread; } set { xxwms_bk_wmsread = value; } } -// [NotMapped] public string ScmRead { get { return xxwms_bk_scmread; } set { xxwms_bk_scmread = value; } } -// [NotMapped] public string MesRead { get { return xxwms_bk_mesread; } set { xxwms_bk_mesread = value; } } -// [NotMapped] public string Remark { get { return xxwms_bk_rmks; } set { xxwms_bk_rmks = value; } } -// -// [NotMapped] public DateTime? CreateTime { get { return xxwms_bk_createdt; } set { xxwms_bk_createdt = value; } } -// [NotMapped] public string CreateUser { get { return xxwms_bk_createur; } set { xxwms_bk_createur = value; } } -// [NotMapped] public DateTime? UpdateTime { get { return xxwms_bk_updatedt; } set { xxwms_bk_updatedt = value; } } -// [NotMapped] public string UpdateUser { get { return xxwms_bk_updateur; } set { xxwms_bk_updateur = value; } } - public override string ToString() - { - - return EntitiesHelper.GetPropertiesString(this); - } - } - - /// <summary> - /// 其它出库 from WMS - /// </summary> - public partial class xxwms_iss_det - { -// [NotMapped] public int UID { get { return xxwms_iss_uid; } set { xxwms_iss_uid = value; } } -// -// [NotMapped] public string Seq { get { return xxwms_iss_seq; } set { xxwms_iss_seq = value; } } -// [NotMapped] public string QadRead { get { return xxwms_iss_qadread; } set { xxwms_iss_qadread = value; } } -// [NotMapped] public string WmsRead { get { return xxwms_iss_wmsread; } set { xxwms_iss_wmsread = value; } } -// [NotMapped] public string ScmRead { get { return xxwms_iss_scmread; } set { xxwms_iss_scmread = value; } } -// [NotMapped] public string MesRead { get { return xxwms_iss_mesread; } set { xxwms_iss_mesread = value; } } -// [NotMapped] public string Remark { get { return xxwms_iss_rmks; } set { xxwms_iss_rmks = value; } } -// -// [NotMapped] public DateTime? CreateTime { get { return xxwms_iss_createdt; } set { xxwms_iss_createdt = value; } } -// [NotMapped] public string CreateUser { get { return xxwms_iss_createur; } set { xxwms_iss_createur = value; } } -// [NotMapped] public DateTime? UpdateTime { get { return xxwms_iss_updatedt; } set { xxwms_iss_updatedt = value; } } -// [NotMapped] public string UpdateUser { get { return xxwms_iss_updateur; } set { xxwms_iss_updateur = value; } } - public override string ToString() - { - - return EntitiesHelper.GetPropertiesString(this); - } - } - - /// <summary> - /// 其它入库 from WMS - /// </summary> - public partial class xxwms_rct_det - { -// [NotMapped] public int UID { get { return xxwms_rct_uid; } set { xxwms_rct_uid = value; } } -// -// [NotMapped] public string Seq { get { return xxwms_rct_seq; } set { xxwms_rct_seq = value; } } -// [NotMapped] public string QadRead { get { return xxwms_rct_qadread; } set { xxwms_rct_qadread = value; } } -// [NotMapped] public string WmsRead { get { return xxwms_rct_wmsread; } set { xxwms_rct_wmsread = value; } } -// [NotMapped] public string ScmRead { get { return xxwms_rct_scmread; } set { xxwms_rct_scmread = value; } } -// [NotMapped] public string MesRead { get { return xxwms_rct_mesread; } set { xxwms_rct_mesread = value; } } -// [NotMapped] public string Remark { get { return xxwms_rct_rmks; } set { xxwms_rct_rmks = value; } } -// -// [NotMapped] public DateTime? CreateTime { get { return xxwms_rct_createdt; } set { xxwms_rct_createdt = value; } } -// [NotMapped] public string CreateUser { get { return xxwms_rct_createur; } set { xxwms_rct_createur = value; } } -// [NotMapped] public DateTime? UpdateTime { get { return xxwms_rct_updatedt; } set { xxwms_rct_updatedt = value; } } -// [NotMapped] public string UpdateUser { get { return xxwms_rct_updateur; } set { xxwms_rct_updateur = value; } } - public override string ToString() - { - - return EntitiesHelper.GetPropertiesString(this); - } - } - - /// <summary> - /// 销售结算 from WMS - /// </summary> - public partial class xxwms_soiss_det - { -// [NotMapped] public int UID { get { return xxwms_soiss_uid; } set { xxwms_soiss_uid = value; } } -// -// [NotMapped] public string Seq { get { return xxwms_soiss_seq; } set { xxwms_soiss_seq = value; } } -// [NotMapped] public string QadRead { get { return xxwms_soiss_qadread; } set { xxwms_soiss_qadread = value; } } -// [NotMapped] public string WmsRead { get { return xxwms_soiss_wmsread; } set { xxwms_soiss_wmsread = value; } } -// [NotMapped] public string ScmRead { get { return xxwms_soiss_scmread; } set { xxwms_soiss_scmread = value; } } -// [NotMapped] public string MesRead { get { return xxwms_soiss_mesread; } set { xxwms_soiss_mesread = value; } } -// [NotMapped] public string Remark { get { return xxwms_soiss_rmks; } set { xxwms_soiss_rmks = value; } } -// -// [NotMapped] public DateTime? CreateTime { get { return xxwms_soiss_createdt; } set { xxwms_soiss_createdt = value; } } -// [NotMapped] public string CreateUser { get { return xxwms_soiss_createur; } set { xxwms_soiss_createur = value; } } -// [NotMapped] public DateTime? UpdateTime { get { return xxwms_soiss_updatedt; } set { xxwms_soiss_updatedt = value; } } -// [NotMapped] public string UpdateUser { get { return xxwms_soiss_updateur; } set { xxwms_soiss_updateur = value; } } - public override string ToString() - { - - return EntitiesHelper.GetPropertiesString(this); - } - } - - /// <summary> - /// 库存盘点 from WMS - /// </summary> - public partial class xxwms_tag_det - { -// [NotMapped] public int UID { get { return xxwms_tag_uid; } set { xxwms_tag_uid = value; } } -// -// [NotMapped] public string Seq { get { return xxwms_tag_seq; } set { xxwms_tag_seq = value; } } -// [NotMapped] public string QadRead { get { return xxwms_tag_qadread; } set { xxwms_tag_qadread = value; } } -// [NotMapped] public string WmsRead { get { return xxwms_tag_wmsread; } set { xxwms_tag_wmsread = value; } } -// [NotMapped] public string ScmRead { get { return xxwms_tag_scmread; } set { xxwms_tag_scmread = value; } } -// [NotMapped] public string MesRead { get { return xxwms_tag_mesread; } set { xxwms_tag_mesread = value; } } -// [NotMapped] public string Remark { get { return xxwms_tag_rmks; } set { xxwms_tag_rmks = value; } } -// -// [NotMapped] public DateTime? CreateTime { get { return xxwms_tag_createdt; } set { xxwms_tag_createdt = value; } } -// [NotMapped] public string CreateUser { get { return xxwms_tag_createur; } set { xxwms_tag_createur = value; } } -// [NotMapped] public DateTime? UpdateTime { get { return xxwms_tag_updatedt; } set { xxwms_tag_updatedt = value; } } -// [NotMapped] public string UpdateUser { get { return xxwms_tag_updateur; } set { xxwms_tag_updateur = value; } } - public override string ToString() - { - - return EntitiesHelper.GetPropertiesString(this); - } - } - - - /// <summary> - /// 发货单(ASN) from SCM - /// </summary> - public partial class xxscm_tx_mstr - { -// [NotMapped] public int UID { get { return xxscm_tx_uid; } set { xxscm_tx_uid = value; } } -// -// [NotMapped] public string Seq { get { return xxscm_tx_seq; } set { xxscm_tx_seq = value; } } -// [NotMapped] public string QadRead { get { return xxscm_tx_qadread; } set { xxscm_tx_qadread = value; } } -// [NotMapped] public string WmsRead { get { return xxscm_tx_wmsread; } set { xxscm_tx_wmsread = value; } } -// [NotMapped] public string ScmRead { get { return xxscm_tx_scmread; } set { xxscm_tx_scmread = value; } } -// [NotMapped] public string MesRead { get { return xxscm_tx_mesread; } set { xxscm_tx_mesread = value; } } -// [NotMapped] public string Remark { get { return xxscm_tx_rmks; } set { xxscm_tx_rmks = value; } } -// -// [NotMapped] public DateTime? CreateTime { get { return xxscm_tx_createdt; } set { xxscm_tx_createdt = value; } } -// [NotMapped] public string CreateUser { get { return xxscm_tx_createur; } set { xxscm_tx_createur = value; } } -// [NotMapped] public DateTime? UpdateTime { get { return xxscm_tx_updatedt; } set { xxscm_tx_updatedt = value; } } -// [NotMapped] public string UpdateUser { get { return xxscm_tx_updateur; } set { xxscm_tx_updateur = value; } } - public override string ToString() - { - - return EntitiesHelper.GetPropertiesString(this); - } - } - - /// <summary> - /// 发货单明细 from SCM - /// </summary> - public partial class xxscm_tx_det - { -// [NotMapped] public int UID { get { return xxscm_tx_uid; } set { xxscm_tx_uid = value; } } -// -// [NotMapped] public string Seq { get { return xxscm_tx_seq; } set { xxscm_tx_seq = value; } } -// [NotMapped] public string QadRead { get { return xxscm_tx_qadread; } set { xxscm_tx_qadread = value; } } -// [NotMapped] public string WmsRead { get { return xxscm_tx_wmsread; } set { xxscm_tx_wmsread = value; } } -// [NotMapped] public string ScmRead { get { return xxscm_tx_scmread; } set { xxscm_tx_scmread = value; } } -// [NotMapped] public string MesRead { get { return xxscm_tx_mesread; } set { xxscm_tx_mesread = value; } } -// [NotMapped] public string Remark { get { return xxscm_tx_rmks; } set { xxscm_tx_rmks = value; } } -// -// [NotMapped] public DateTime? CreateTime { get { return xxscm_tx_createdt; } set { xxscm_tx_createdt = value; } } -// [NotMapped] public string CreateUser { get { return xxscm_tx_createur; } set { xxscm_tx_createur = value; } } -// [NotMapped] public DateTime? UpdateTime { get { return xxscm_tx_updatedt; } set { xxscm_tx_updatedt = value; } } -// [NotMapped] public string UpdateUser { get { return xxscm_tx_updateur; } set { xxscm_tx_updateur = value; } } - public override string ToString() - { - - return EntitiesHelper.GetPropertiesString(this); - } - } - - /// <summary> - /// 发票 from SCM - /// </summary> - public partial class xxscm_inv_det - { -// [NotMapped] public int UID { get { return xxscm_inv_uid; } set { xxscm_inv_uid = value; } } -// -// [NotMapped] public string Seq { get { return xxscm_inv_seq; } set { xxscm_inv_seq = value; } } -// [NotMapped] public string QadRead { get { return xxscm_inv_qadread; } set { xxscm_inv_qadread = value; } } -// [NotMapped] public string WmsRead { get { return xxscm_inv_wmsread; } set { xxscm_inv_wmsread = value; } } -// [NotMapped] public string ScmRead { get { return xxscm_inv_scmread; } set { xxscm_inv_scmread = value; } } -// [NotMapped] public string MesRead { get { return xxscm_inv_mesread; } set { xxscm_inv_mesread = value; } } -// [NotMapped] public string Remark { get { return xxscm_inv_rmks; } set { xxscm_inv_rmks = value; } } -// -// [NotMapped] public DateTime? CreateTime { get { return xxscm_inv_createdt; } set { xxscm_inv_createdt = value; } } -// [NotMapped] public string CreateUser { get { return xxscm_inv_createur; } set { xxscm_inv_createur = value; } } -// [NotMapped] public DateTime? UpdateTime { get { return xxscm_inv_updatedt; } set { xxscm_inv_updatedt = value; } } -// [NotMapped] public string UpdateUser { get { return xxscm_inv_updateur; } set { xxscm_inv_updateur = value; } } - public override string ToString() - { - - return EntitiesHelper.GetPropertiesString(this); - } - } - - /// <summary> - /// 采购订单信息 from QAD - /// </summary> - public partial class xxscm_pod_det - { -// [NotMapped] public int UID { get { return xxscm_pod_uid; } set { xxscm_pod_uid = value; } } -// -// [NotMapped] public string Seq { get { return xxscm_pod_seq; } set { xxscm_pod_seq = value; } } -// [NotMapped] public string QadRead { get { return xxscm_pod_qadread; } set { xxscm_pod_qadread = value; } } -// [NotMapped] public string WmsRead { get { return xxscm_pod_wmsread; } set { xxscm_pod_wmsread = value; } } -// [NotMapped] public string ScmRead { get { return xxscm_pod_scmread; } set { xxscm_pod_scmread = value; } } -// [NotMapped] public string MesRead { get { return xxscm_pod_mesread; } set { xxscm_pod_mesread = value; } } -// [NotMapped] public string Remark { get { return xxscm_pod_rmks; } set { xxscm_pod_rmks = value; } } -// -// [NotMapped] public DateTime? CreateTime { get { return xxscm_pod_createdt; } set { xxscm_pod_createdt = value; } } -// [NotMapped] public string CreateUser { get { return xxscm_pod_createur; } set { xxscm_pod_createur = value; } } -// [NotMapped] public DateTime? UpdateTime { get { return xxscm_pod_updatedt; } set { xxscm_pod_updatedt = value; } } -// [NotMapped] public string UpdateUser { get { return xxscm_pod_updateur; } set { xxscm_pod_updateur = value; } } - public override string ToString() - { - - return EntitiesHelper.GetPropertiesString(this); - } - } - - -} \ No newline at end of file diff --git a/CK.SCP.Models/UniApiEntity/xxbom_code_mstr.cs b/CK.SCP.Models/UniApiEntity/xxbom_code_mstr.cs deleted file mode 100644 index b28ebad..0000000 --- a/CK.SCP.Models/UniApiEntity/xxbom_code_mstr.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace CK.SCP.Models.UniApiEntity -{ - public partial class xxbom_code_mstr - { - [Key] - [Column(Order = 0)] - [StringLength(50)] - public string xxbom_code_table { get; set; } - - [Key] - [Column(Order = 1)] - [StringLength(50)] - public string xxbom_code_value { get; set; } - - [Key] - [Column(Order = 2)] - [StringLength(50)] - public string xxbom_code_rmks { get; set; } - - [StringLength(8)] - public string xxbom_domain { get; set; } - } -} diff --git a/CK.SCP.Models/UniApiEntity/xxbom_ctrl.cs b/CK.SCP.Models/UniApiEntity/xxbom_ctrl.cs deleted file mode 100644 index 389638d..0000000 --- a/CK.SCP.Models/UniApiEntity/xxbom_ctrl.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace CK.SCP.Models.UniApiEntity -{ - public partial class xxbom_ctrl - { - [DatabaseGenerated(DatabaseGeneratedOption.Identity)] - public int xxbom_uid { get; set; } - - [Key] - [StringLength(50)] - public string xxbom_seq { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string xxbom_table { get; set; } - - public int xxbom_table_qty { get; set; } - - [StringLength(1)] - public string xxbom_qad { get; set; } - - [StringLength(1)] - public string xxbom_mes { get; set; } - - [StringLength(1)] - public string xxbom_scm { get; set; } - - [StringLength(1)] - public string xxbom_wms { get; set; } - - public string xxbom_rmks { get; set; } - - [StringLength(8)] - public string xxbom_domain { get; set; } - } -} diff --git a/CK.SCP.Models/UniApiEntity/xxbom_ps_mstr.cs b/CK.SCP.Models/UniApiEntity/xxbom_ps_mstr.cs deleted file mode 100644 index c281c46..0000000 --- a/CK.SCP.Models/UniApiEntity/xxbom_ps_mstr.cs +++ /dev/null @@ -1,126 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace CK.SCP.Models.UniApiEntity -{ - public partial class xxbom_ps_mstr - { - [Key] - public int xxbom_ps_UID { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string xxbom_ps_seq { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string xxbom_ps_project { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(18)] - public string xxbom_ps_par { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(18)] - public string xxbom_ps_comp { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(12)] - public string xxbom_ps_ref { get; set; } - - public decimal xxbom_ps_qty_per { get; set; } - - public decimal? xxbom_ps_scrp_pct { get; set; } - - public int? xxbom_ps_lt_off { get; set; } - - public DateTime xxbom_ps_start { get; set; } - - public DateTime? xxbom_ps_end { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(24)] - public string xxbom_ps_rmks { get; set; } - - public int xxbom_ps_op { get; set; } - - public int? xxbom_ps_item_no { get; set; } - - public bool? xxbom_ps_mandatory { get; set; } - - public bool? xxbom_ps_exclusive { get; set; } - - [StringLength(8)] - public string xxbom_ps_process { get; set; } - - [StringLength(1)] - public string xxbom_ps_qty_type { get; set; } - - [StringLength(8)] - public string xxbom_ps_user1 { get; set; } - - [StringLength(8)] - public string xxbom_ps_user2 { get; set; } - - public decimal? xxbom_ps_fcst_pct { get; set; } - - public bool? xxbom_ps_default { get; set; } - - [StringLength(8)] - public string xxbom_ps_group { get; set; } - - public bool? xxbom_ps_critical { get; set; } - - public decimal? xxbom_ps_qty_per_b { get; set; } - - [StringLength(2)] - public string xxbom_ps_comp_um { get; set; } - - [StringLength(50)] - public string xxbom_ps_um_conv { get; set; } - - public decimal? xxbom_ps_assay { get; set; } - - [StringLength(8)] - public string xxbom_ps_comm_code { get; set; } - - public bool? xxbom_ps_non_bal { get; set; } - - public bool? xxbom_ps_byproduct { get; set; } - - [StringLength(8)] - public string xxbom_ps_userid { get; set; } - - [Column(TypeName = "date")] - public DateTime? xxbom_ps_mod_date { get; set; } - - public decimal? xxbom_ps_batch_pct { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(1)] - public string xxbom_ps_qadread { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(1)] - public string xxbom_ps_wmsread { get; set; } - - [StringLength(1)] - public string xxbom_ps_scmread { get; set; } - - public string xxbom_ps_mesread { get; set; } - - public DateTime? xxbom_ps_createdt { get; set; } - - [StringLength(8)] - public string xxbom_ps_createur { get; set; } - - public DateTime? xxbom_ps_updatedt { get; set; } - - [StringLength(8)] - public string xxbom_ps_updateur { get; set; } - - [StringLength(8)] - public string xxbom_ps_domain { get; set; } - } -} diff --git a/CK.SCP.Models/UniApiEntity/xxbom_pt_mstr.cs b/CK.SCP.Models/UniApiEntity/xxbom_pt_mstr.cs deleted file mode 100644 index c8c016f..0000000 --- a/CK.SCP.Models/UniApiEntity/xxbom_pt_mstr.cs +++ /dev/null @@ -1,154 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; - -namespace CK.SCP.Models.UniApiEntity -{ - public partial class xxbom_pt_mstr - { - [Key] - public int xxbom_pt_UID { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string xxbom_pt_seq { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(18)] - public string xxbom_pt_part { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(24)] - public string xxbom_pt_desc1 { get; set; } - - [StringLength(24)] - public string xxbom_pt_desc2 { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(2)] - public string xxbom_pt_um { get; set; } - - [StringLength(18)] - public string xxbom_pt_draw { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(4)] - public string xxbom_pt_prod_line { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxbom_pt_group { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxbom_pt_part_type { get; set; } - - [StringLength(8)] - public string xxbom_pt_dsgn_grp { get; set; } - - [StringLength(8)] - public string xxbom_pt_promo { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(4)] - public string xxbom_pt_status { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(1)] - public string xxbom_pt_abc { get; set; } - - public bool? xxbom_pt_iss_pol { get; set; } - - public bool? xxbom_pt_phantom { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxbom_pt_loc { get; set; } - - public int? xxbom_pt_avg_int { get; set; } - - public int? xxbom_pt_cyc_int { get; set; } - - public bool? xxbom_pt_ms { get; set; } - - public bool? xxbom_pt_plan_ord { get; set; } - - public bool? xxbom_pt_mrp { get; set; } - - [StringLength(3)] - public string xxbom_pt_ord_pol { get; set; } - - public decimal? xxbom_pt_ord_qty { get; set; } - - public int? xxbom_pt_ord_per { get; set; } - - public decimal? xxbom_pt_sfty_stk { get; set; } - - public decimal? xxbom_pt_sfty_time { get; set; } - - public decimal? xxbom_pt_rop { get; set; } - - [StringLength(8)] - public string xxbom_pt_buyer { get; set; } - - [StringLength(8)] - public string xxbom_pt_vend { get; set; } - - [StringLength(1)] - public string xxbom_pt_pm_code { get; set; } - - public decimal? xxbom_pt_mfg_lead { get; set; } - - public int? xxbom_pt_pur_lead { get; set; } - - public bool? xxbom_pt_insp_rqd { get; set; } - - public int? xxbom_pt_insp_lead { get; set; } - - public int? xxbom_pt_cum_lead { get; set; } - - public decimal? xxbom_pt_ord_min { get; set; } - - public decimal? xxbom_pt_ord_max { get; set; } - - public decimal? xxbom_pt_ord_mult { get; set; } - - public decimal? xxbom_pt_yield_pct { get; set; } - - public decimal? xxbom_pt_setup { get; set; } - - public decimal? xxbom_pt_setup_ll { get; set; } - - public decimal? xxbom_pt_run_ll { get; set; } - - public decimal? xxbom_pt_run { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(1)] - public string xxbom_pt_qadread { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(1)] - public string xxbom_pt_wmsread { get; set; } - - [StringLength(1)] - public string xxbom_pt_scmread { get; set; } - - [StringLength(1)] - public string xxbom_pt_mesread { get; set; } - - public string xxbom_pt_rmks { get; set; } - - public DateTime? xxbom_pt_createdt { get; set; } - - [StringLength(8)] - public string xxbom_pt_createur { get; set; } - - public DateTime? xxbom_pt_updatedt { get; set; } - - [StringLength(8)] - public string xxbom_pt_updateur { get; set; } - - [StringLength(8)] - public string xxbom_pt_domain { get; set; } - } -} diff --git a/CK.SCP.Models/UniApiEntity/xxbom_ro_mstr.cs b/CK.SCP.Models/UniApiEntity/xxbom_ro_mstr.cs deleted file mode 100644 index 761a1ca..0000000 --- a/CK.SCP.Models/UniApiEntity/xxbom_ro_mstr.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; - -namespace CK.SCP.Models.UniApiEntity -{ - public partial class xxbom_ro_mstr - { - [Key] - public int xxbom_ro_UID { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string xxbom_ro_seq { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(18)] - public string xxbom_ro_routing { get; set; } - - public int xxbom_ro_op { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(24)] - public string xxbom_ro_desc { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxbom_ro_wkctr { get; set; } - - public decimal xxbom_ro_run { get; set; } - - public DateTime? xxbom_ro_start { get; set; } - - public DateTime? xxbom_ro_end { get; set; } - - public bool xxbom_ro_milestone { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(1)] - public string xxbom_ro_qadread { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(1)] - public string xxbom_ro_wmsread { get; set; } - - [StringLength(1)] - public string xxbom_ro_scmread { get; set; } - - [StringLength(1)] - public string xxbom_ro_mesread { get; set; } - - [StringLength(50)] - public string xxbom_ro_rmks { get; set; } - - public DateTime xxbom_ro_createdt { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxbom_ro_createur { get; set; } - - public DateTime xxbom_ro_updatedt { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxbom_ro_updateur { get; set; } - - [StringLength(8)] - public string xxbom_ro_domain { get; set; } - } -} diff --git a/CK.SCP.Models/UniApiEntity/xxmes_ctrl.cs b/CK.SCP.Models/UniApiEntity/xxmes_ctrl.cs deleted file mode 100644 index 40d9b2f..0000000 --- a/CK.SCP.Models/UniApiEntity/xxmes_ctrl.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System.ComponentModel.DataAnnotations; - -namespace CK.SCP.Models.UniApiEntity -{ - public partial class xxmes_ctrl - { - public int xxmes_ctrl_uid { get; set; } - - [Key] - [StringLength(50)] - public string xxmes_seq { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string xxmes_table { get; set; } - - public int xxmes_table_qty { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(1)] - public string xxmes_qad { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(1)] - public string xxmes_mes { get; set; } - - [StringLength(1)] - public string xxmes_scm { get; set; } - - [StringLength(1)] - public string xxmes_wms { get; set; } - - public string xxmes_rmks { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxmes_domain { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxmes_site { get; set; } - } -} diff --git a/CK.SCP.Models/UniApiEntity/xxqad_cm_mstr.cs b/CK.SCP.Models/UniApiEntity/xxqad_cm_mstr.cs deleted file mode 100644 index 39851db..0000000 --- a/CK.SCP.Models/UniApiEntity/xxqad_cm_mstr.cs +++ /dev/null @@ -1,98 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; - -namespace CK.SCP.Models.UniApiEntity -{ - public partial class xxqad_cm_mstr - { - [Key] - public int xxqad_cm_uid { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string xxqad_cm_seq { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxqad_cm_addr { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxqad_cm_domain { get; set; } - - [StringLength(8)] - public string xxqad_cm_site { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(100)] - public string xxqad_cm_name { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(100)] - public string xxqad_cm_line1 { get; set; } - - [StringLength(100)] - public string xxqad_cm_line2 { get; set; } - - [StringLength(100)] - public string xxqad_cm_line3 { get; set; } - - [StringLength(8)] - public string xxqad_cm_country { get; set; } - - [StringLength(8)] - public string xxqad_cm_city { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(15)] - public string xxqad_cm_phone { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(15)] - public string xxqad_cm_fax { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(15)] - public string xxqad_cm_pst_id { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string xxqad_cm_attn { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(15)] - public string xxqad_cm_curr { get; set; } - - public bool xxqad_cm_active { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(2)] - public string xxqad_cm_promo { get; set; } - - public int xxqad_cm_type { get; set; } - - [StringLength(1)] - public string xxqad_cm_qadread { get; set; } - - [StringLength(1)] - public string xxqad_cm_wmsread { get; set; } - - [StringLength(1)] - public string xxqad_cm_scmread { get; set; } - - [StringLength(1)] - public string xxqad_cm_mesread { get; set; } - - public string xxqad_cm_rmks { get; set; } - - public DateTime? xxqad_cm_createdt { get; set; } - - [StringLength(8)] - public string xxqad_cm_createur { get; set; } - - public DateTime? xxqad_cm_updatedt { get; set; } - - [StringLength(8)] - public string xxqad_cm_updateur { get; set; } - } -} diff --git a/CK.SCP.Models/UniApiEntity/xxqad_ctrl.cs b/CK.SCP.Models/UniApiEntity/xxqad_ctrl.cs deleted file mode 100644 index 57ba9c8..0000000 --- a/CK.SCP.Models/UniApiEntity/xxqad_ctrl.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace CK.SCP.Models.UniApiEntity -{ - public partial class xxqad_ctrl - { - [DatabaseGenerated(DatabaseGeneratedOption.Identity)] - public int xxqad_uid { get; set; } - - [Key] - [StringLength(50)] - public string xxqad_seq { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(18)] - public string xxqad_table { get; set; } - - public int xxqad_table_qty { get; set; } - - [StringLength(1)] - public string xxqad_qad { get; set; } - - [StringLength(1)] - public string xxqad_mes { get; set; } - - [StringLength(1)] - public string xxqad_scm { get; set; } - - [StringLength(1)] - public string xxqad_wms { get; set; } - - public string xxqad_rmks { get; set; } - -// public DateTime xxqad_create_time { get; set; } -// -// [Required(AllowEmptyStrings = true)] -// [StringLength(20)] -// public string xxqad_domain { get; set; } - - //[StringLength(8)] - //public string xxqad_site { get; set; } - } -} diff --git a/CK.SCP.Models/UniApiEntity/xxqad_ld_det.cs b/CK.SCP.Models/UniApiEntity/xxqad_ld_det.cs deleted file mode 100644 index 4427b54..0000000 --- a/CK.SCP.Models/UniApiEntity/xxqad_ld_det.cs +++ /dev/null @@ -1,66 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; - -namespace CK.SCP.Models.UniApiEntity -{ - public partial class xxqad_ld_det - { - [Key] - public int xxqad_ld_uid { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string xxqad_ld_seq { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxqad_ld_site { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(18)] - public string xxqad_ld_part { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxqad_ld_loc { get; set; } - - [StringLength(8)] - public string xxqad_ld_lot { get; set; } - - public DateTime? xxqad_ld_date { get; set; } - - public DateTime? xxqad_ld_time { get; set; } - - public decimal xxqad_ld_qty { get; set; } - - [StringLength(2)] - public string xxqad_ld_um { get; set; } - - [StringLength(10)] - public string xxqad_ld_domain { get; set; } - - [StringLength(1)] - public string xxqad_ld_qadread { get; set; } - - [StringLength(1)] - public string xxqad_ld_wmsread { get; set; } - - [StringLength(1)] - public string xxqad_ld_scmread { get; set; } - - [StringLength(1)] - public string xxqad_ld_mesread { get; set; } - - public string xxqad_ld_rmks { get; set; } - - public DateTime? xxqad_ld_createdt { get; set; } - - [StringLength(8)] - public string xxqad_ld_createur { get; set; } - - public DateTime? xxqad_ld_updatedt { get; set; } - - [StringLength(8)] - public string xxqad_ld_updateur { get; set; } - } -} diff --git a/CK.SCP.Models/UniApiEntity/xxqad_line_mstr.cs b/CK.SCP.Models/UniApiEntity/xxqad_line_mstr.cs deleted file mode 100644 index 414668f..0000000 --- a/CK.SCP.Models/UniApiEntity/xxqad_line_mstr.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; - -namespace CK.SCP.Models.UniApiEntity -{ - public partial class xxqad_line_mstr - { - [Key] - public int xxqad_line_uid { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string xxqad_line_seq { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string xxqad_line_domain { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string xxqad_line_site { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string xxqad_line_ln { get; set; } - - [StringLength(50)] - public string xxqad_line_desc { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string xxqad_line_part { get; set; } - - [StringLength(3)] - public string xxqad_line_primary { get; set; } - - public int? xxqad_line_rate { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(1)] - public string xxqad_line_qadread { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(1)] - public string xxqad_line_mesread { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(1)] - public string xxqad_line_wmsread { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(1)] - public string xxqad_line_scmread { get; set; } - - [StringLength(50)] - public string xxqad_line_rmks { get; set; } - - public DateTime xxqad_line_createdt { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string xxqad_line_createur { get; set; } - - public DateTime? xxqad_line_updatedt { get; set; } - - [StringLength(50)] - public string xxqad_line_updateur { get; set; } - } -} diff --git a/CK.SCP.Models/UniApiEntity/xxqad_loc_det.cs b/CK.SCP.Models/UniApiEntity/xxqad_loc_det.cs deleted file mode 100644 index afadb85..0000000 --- a/CK.SCP.Models/UniApiEntity/xxqad_loc_det.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; - -namespace CK.SCP.Models.UniApiEntity -{ - public partial class xxqad_loc_det - { - [Key] - public int xxqad_loc_uid { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string xxqad_loc_seq { get; set; } - - [StringLength(8)] - public string xxqad_loc_loc { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxqad_loc_site { get; set; } - - [StringLength(50)] - public string xxqad_loc_desc { get; set; } - - [StringLength(8)] - public string xxqad_loc_type { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxqad_loc_domain { get; set; } - - [StringLength(1)] - public string xxqad_loc_qadread { get; set; } - - [StringLength(1)] - public string xxqad_loc_wmsread { get; set; } - - [StringLength(1)] - public string xxqad_loc_scmread { get; set; } - - [StringLength(1)] - public string xxqad_loc_mesread { get; set; } - - public string xxqad_loc_rmks { get; set; } - - public DateTime? xxqad_loc_createdt { get; set; } - - [StringLength(8)] - public string xxqad_loc_createur { get; set; } - - public DateTime? xxqad_loc_updatedt { get; set; } - - [StringLength(8)] - public string xxqad_loc_updateur { get; set; } - } -} diff --git a/CK.SCP.Models/UniApiEntity/xxqad_pod_det.cs b/CK.SCP.Models/UniApiEntity/xxqad_pod_det.cs deleted file mode 100644 index 182c8b2..0000000 --- a/CK.SCP.Models/UniApiEntity/xxqad_pod_det.cs +++ /dev/null @@ -1,121 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; - -namespace CK.SCP.Models.UniApiEntity -{ - public partial class xxqad_pod_det - { - [Key] - public int xxqad_pod_uid { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string xxqad_pod_seq { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxqad_pod_nbr { get; set; } - - public int xxqad_pod_line { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxqad_pod_modtype { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxqad_pod_site { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxqad_pod_domain { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(18)] - public string xxqad_pod_part { get; set; } - - [StringLength(50)] - public string xxqad_pod_desc { get; set; } - - public decimal xxqad_pod_qty_ord { get; set; } - - public decimal xxqad_pod_qty_rct { get; set; } - - public decimal xxqad_pod_qty_std { get; set; } - - public DateTime xxqad_pod_due_date { get; set; } - - public decimal xxqad_pod_price { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxqad_pod_curr { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxqad_pod_loc_um { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxqad_pod_um { get; set; } - - public decimal xxqad_pod_um_conv { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxqad_pod_vend { get; set; } - - [StringLength(100)] - public string xxqad_pod_name { get; set; } - - [StringLength(8)] - public string xxqad_pod_attn { get; set; } - - [StringLength(8)] - public string xxqad_pod_ship { get; set; } - - [StringLength(2)] - public string xxqad_pod_made { get; set; } - - public bool? xxqad_pod_confirm { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxqad_pod_buyer { get; set; } - - [StringLength(20)] - public string xxqad_pod_buyer_phone { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxqad_pod_status { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(1)] - public string xxqad_pod_qadread { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(1)] - public string xxqad_pod_wmsread { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(1)] - public string xxqad_pod_scmread { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(1)] - public string xxqad_pod_mesread { get; set; } - - public string xxqad_pod_rmks { get; set; } - - public DateTime? xxqad_pod_createdt { get; set; } - - [StringLength(8)] - public string xxqad_pod_createur { get; set; } - - public DateTime? xxqad_pod_updatedt { get; set; } - - [StringLength(8)] - public string xxqad_pod_updateur { get; set; } - } -} diff --git a/CK.SCP.Models/UniApiEntity/xxqad_pprice_det.cs b/CK.SCP.Models/UniApiEntity/xxqad_pprice_det.cs deleted file mode 100644 index b25530c..0000000 --- a/CK.SCP.Models/UniApiEntity/xxqad_pprice_det.cs +++ /dev/null @@ -1,66 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; - -namespace CK.SCP.Models.UniApiEntity -{ - public partial class xxqad_pprice_det - { - [Key] - public int xxqad_pprice_uid { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string xxqad_pprice_seq { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxqad_pprice_list { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxqad_pprice_domain { get; set; } - - [StringLength(8)] - public string xxqad_pprice_site { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(18)] - public string xxqad_pprice_part { get; set; } - - public DateTime? xxqad_pprice_start { get; set; } - - public DateTime? xxqad_pprice_end { get; set; } - - [StringLength(8)] - public string xxqad_pprice_curr { get; set; } - - [StringLength(8)] - public string xxqad_pprice_um { get; set; } - - public decimal xxqad_pprice_amt { get; set; } - - [StringLength(1)] - public string xxqad_pprice_qadread { get; set; } - - [StringLength(1)] - public string xxqad_pprice_wmsread { get; set; } - - [StringLength(1)] - public string xxqad_pprice_scmread { get; set; } - - [StringLength(1)] - public string xxqad_pprice_mesread { get; set; } - - public string xxqad_pprice_rmks { get; set; } - - public DateTime? xxqad_pprice_createdt { get; set; } - - [StringLength(8)] - public string xxqad_pprice_createur { get; set; } - - public DateTime? xxqad_pprice_updatedt { get; set; } - - [StringLength(8)] - public string xxqad_pprice_updateur { get; set; } - } -} diff --git a/CK.SCP.Models/UniApiEntity/xxqad_prh_det.cs b/CK.SCP.Models/UniApiEntity/xxqad_prh_det.cs deleted file mode 100644 index c198691..0000000 --- a/CK.SCP.Models/UniApiEntity/xxqad_prh_det.cs +++ /dev/null @@ -1,117 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; - -namespace CK.SCP.Models.UniApiEntity -{ - public partial class xxqad_prh_det - { - [Key] - public int xxqad_prh_uid { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string xxqad_prh_seq { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(20)] - public string xxqad_prh_receiver { get; set; } - - [StringLength(20)] - public string xxqad_prh_psnbr { get; set; } - - public int xxqad_prh_trnbr { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxqad_prh_trtype { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxqad_prh_po_nbr { get; set; } - - public int xxqad_prh_po_line { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(18)] - public string xxqad_prh_part { get; set; } - - public decimal xxqad_prh_qty_rcvd { get; set; } - - public decimal xxqad_prh_qty_ord { get; set; } - - public decimal xxqad_prh_pur_cost { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string xxqad_prh_curr { get; set; } - - public decimal xxqad_prh_curr_amt { get; set; } - - public DateTime xxqad_prh_date_ship { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxqad_prh_site { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxqad_prh_vend { get; set; } - - [StringLength(20)] - public string xxqad_prh_ware_class { get; set; } - - [StringLength(20)] - public string xxqad_prh_ware { get; set; } - - [StringLength(8)] - public string xxqad_prh_loc { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(2)] - public string xxqad_prh_po_um { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(2)] - public string xxqad_prh_loc_um { get; set; } - - public decimal xxqad_prh_conv { get; set; } - - [StringLength(20)] - public string xxqad_prh_lot { get; set; } - - [StringLength(20)] - public string xxqad_prh_vend_batch { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(1)] - public string xxqad_prh_qadread { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(1)] - public string xxqad_prh_wmsread { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(1)] - public string xxqad_prh_scmread { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(1)] - public string xxqad_prh_mesread { get; set; } - - public string xxqad_prh_rmks { get; set; } - - public DateTime xxqad_prh_createdt { get; set; } - - [StringLength(8)] - public string xxqad_prh_createur { get; set; } - - public DateTime? xxqad_prh_updatedt { get; set; } - - [StringLength(8)] - public string xxqad_prh_updateur { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxqad_prh_domain { get; set; } - } -} diff --git a/CK.SCP.Models/UniApiEntity/xxqad_ps_mstr.cs b/CK.SCP.Models/UniApiEntity/xxqad_ps_mstr.cs deleted file mode 100644 index 78df3a9..0000000 --- a/CK.SCP.Models/UniApiEntity/xxqad_ps_mstr.cs +++ /dev/null @@ -1,68 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; - -namespace CK.SCP.Models.UniApiEntity -{ - public partial class xxqad_ps_mstr - { - [Key] - public int xxqad_ps_uid { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string xxqad_ps_seq { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(18)] - public string xxqad_ps_part { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(18)] - public string xxqad_ps_comp { get; set; } - - [StringLength(36)] - public string xxqad_ps_ref { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxqad_ps_domain { get; set; } - - public DateTime? xxqad_ps_start { get; set; } - - public DateTime? xxqad_ps_end { get; set; } - - public decimal xxqad_ps_qty_per { get; set; } - - [StringLength(50)] - public string xxqad_ps_ps_code { get; set; } - - [StringLength(8)] - public string xxqad_ps_rmks { get; set; } - - public int xxqad_ps_op { get; set; } - - [StringLength(1)] - public string xxqad_ps_qadread { get; set; } - - [StringLength(1)] - public string xxqad_ps_wmsread { get; set; } - - [StringLength(1)] - public string xxqad_ps_scmread { get; set; } - - [StringLength(1)] - public string xxqad_ps_mesread { get; set; } - - public string xxqad_ps_rmks1 { get; set; } - - public DateTime? xxqad_ps_createdt { get; set; } - - [StringLength(8)] - public string xxqad_ps_createur { get; set; } - - public DateTime? xxqad_ps_updatedt { get; set; } - - [StringLength(8)] - public string xxqad_ps_updateur { get; set; } - } -} diff --git a/CK.SCP.Models/UniApiEntity/xxqad_pt_mstr.cs b/CK.SCP.Models/UniApiEntity/xxqad_pt_mstr.cs deleted file mode 100644 index 311fba1..0000000 --- a/CK.SCP.Models/UniApiEntity/xxqad_pt_mstr.cs +++ /dev/null @@ -1,85 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; - -namespace CK.SCP.Models.UniApiEntity -{ - public partial class xxqad_pt_mstr - { - [Key] - public int xxqad_pt_uid { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string xxqad_pt_seq { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(18)] - public string xxqad_pt_part { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxqad_pt_domain { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxqad_pt_site { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(2)] - public string xxqad_pt_um { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(36)] - public string xxqad_pt_desc1 { get; set; } - - [StringLength(36)] - public string xxqad_pt_desc2 { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxqad_pt_dsgn_grp { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxqad_pt_promo { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxqad_pt_part_type { get; set; } - - [StringLength(8)] - public string xxqad_pt_group { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxqad_pt_prod_line { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxqad_pt_status { get; set; } - - [StringLength(1)] - public string xxqad_pt_qadread { get; set; } - - [StringLength(1)] - public string xxqad_pt_wmsread { get; set; } - - [StringLength(1)] - public string xxqad_pt_scmread { get; set; } - - [StringLength(1)] - public string xxqad_pt_mesread { get; set; } - - public string xxqad_pt_rmks { get; set; } - - public DateTime? xxqad_pt_createdt { get; set; } - - [StringLength(8)] - public string xxqad_pt_createur { get; set; } - - public DateTime? xxqad_pt_updatedt { get; set; } - - [StringLength(8)] - public string xxqad_pt_updateur { get; set; } - } -} diff --git a/CK.SCP.Models/UniApiEntity/xxqad_repsch_det.cs b/CK.SCP.Models/UniApiEntity/xxqad_repsch_det.cs deleted file mode 100644 index 1bc9b01..0000000 --- a/CK.SCP.Models/UniApiEntity/xxqad_repsch_det.cs +++ /dev/null @@ -1,91 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace CK.SCP.Models.UniApiEntity -{ - public partial class xxqad_repsch_det - { - [Key] - [Column(Order = 0)] - public int xxqad_repsch_uid { get; set; } - - [Key] - [Column(Order = 1)] - [StringLength(50)] - public string xxqad_repsch_seq { get; set; } - - [Key] - [Column(Order = 2)] - [StringLength(8)] - public string xxqad_repsch_domain { get; set; } - - [Key] - [Column(Order = 3)] - [StringLength(8)] - public string xxqad_repsch_site { get; set; } - - [Key] - [Column(Order = 4)] - [StringLength(8)] - public string xxqad_repsch_line { get; set; } - - [Key] - [Column(Order = 5)] - [StringLength(18)] - public string xxqad_repsch_part { get; set; } - - [Key] - [Column(Order = 6)] - public DateTime xxqad_repsch_duedate { get; set; } - - [StringLength(50)] - public string xxqad_repsch_shift { get; set; } - - [Key] - [Column(Order = 7)] - [DatabaseGenerated(DatabaseGeneratedOption.None)] - public int xxqad_repsch_qty { get; set; } - - [Key] - [Column(Order = 8)] - [StringLength(1)] - public string xxqad_repsch_qadread { get; set; } - - [Key] - [Column(Order = 9)] - [StringLength(1)] - public string xxqad_repsch_mesread { get; set; } - - [Key] - [Column(Order = 10)] - [StringLength(1)] - public string xxqad_repsch_scmread { get; set; } - - [Key] - [Column(Order = 11)] - [StringLength(1)] - public string xxqad_repsch_wmsread { get; set; } - - [StringLength(50)] - public string xxqad_repsch_rmks { get; set; } - - [Key] - [Column(Order = 12)] - public DateTime xxqad_repsch_createdt { get; set; } - - [Key] - [Column(Order = 13)] - [StringLength(50)] - public string xxqad_repsch_createur { get; set; } - - [Key] - [Column(Order = 14)] - public DateTime xxqad_repsch_updatedt { get; set; } - - [Key] - [Column(Order = 15)] - [StringLength(50)] - public string xxqad_repsch_updateur { get; set; } - } -} diff --git a/CK.SCP.Models/UniApiEntity/xxqad_ro_mstr.cs b/CK.SCP.Models/UniApiEntity/xxqad_ro_mstr.cs deleted file mode 100644 index 0720390..0000000 --- a/CK.SCP.Models/UniApiEntity/xxqad_ro_mstr.cs +++ /dev/null @@ -1,70 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; - -namespace CK.SCP.Models.UniApiEntity -{ - public partial class xxqad_ro_mstr - { - [Key] - public int xxqad_ro_UID { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string xxqad_ro_seq { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxqad_ro_domain { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(18)] - public string xxqad_ro_routing { get; set; } - - public int xxqad_ro_op { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(24)] - public string xxqad_ro_desc { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxqad_ro_wkctr { get; set; } - - public decimal xxqad_ro_run { get; set; } - - public DateTime? xxqad_ro_start { get; set; } - - public DateTime? xxqad_ro_end { get; set; } - - public bool xxqad_ro_milestone { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(1)] - public string xxqad_ro_qadread { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(1)] - public string xxqad_ro_wmsread { get; set; } - - [StringLength(1)] - public string xxqad_ro_scmread { get; set; } - - [StringLength(1)] - public string xxqad_ro_mesread { get; set; } - - [StringLength(50)] - public string xxqad_ro_rmks { get; set; } - - public DateTime xxqad_ro_createdt { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxqad_ro_createur { get; set; } - - public DateTime xxqad_ro_updatedt { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxqad_ro_updateur { get; set; } - } -} diff --git a/CK.SCP.Models/UniApiEntity/xxqad_sche_mstr.cs b/CK.SCP.Models/UniApiEntity/xxqad_sche_mstr.cs deleted file mode 100644 index a836c65..0000000 --- a/CK.SCP.Models/UniApiEntity/xxqad_sche_mstr.cs +++ /dev/null @@ -1,63 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; - -namespace CK.SCP.Models.UniApiEntity -{ - public partial class xxqad_sche_mstr - { - [Key] - public int xxqad_sche_uid { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string xxqad_sche_seq { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(18)] - public string xxqad_sche_part { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string xxqad_sche_custpart { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxqad_sche_domain { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxqad_sche_cust { get; set; } - - [StringLength(100)] - public string xxqad_sche_name { get; set; } - - [StringLength(100)] - public string xxqad_sche_desc { get; set; } - - public decimal xxqad_sche_comment { get; set; } - - [StringLength(1)] - public string xxqad_sche_qadread { get; set; } - - [StringLength(1)] - public string xxqad_sche_wmsread { get; set; } - - [StringLength(1)] - public string xxqad_sche_scmread { get; set; } - - [StringLength(1)] - public string xxqad_sche_mesread { get; set; } - - public string xxqad_sche_rmks { get; set; } - - public DateTime? xxqad_sche_createdt { get; set; } - - [StringLength(8)] - public string xxqad_sche_createur { get; set; } - - public DateTime? xxqad_sche_updatedt { get; set; } - - [StringLength(8)] - public string xxqad_sche_updateur { get; set; } - } -} diff --git a/CK.SCP.Models/UniApiEntity/xxqad_sct_det.cs b/CK.SCP.Models/UniApiEntity/xxqad_sct_det.cs deleted file mode 100644 index ba94da1..0000000 --- a/CK.SCP.Models/UniApiEntity/xxqad_sct_det.cs +++ /dev/null @@ -1,58 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; - -namespace CK.SCP.Models.UniApiEntity -{ - public partial class xxqad_sct_det - { - [Key] - public int xxqad_sct_uid { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string xxqad_sct_seq { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxqad_sct_site { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(18)] - public string xxqad_sct_part { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxqad_sct_domain { get; set; } - - [StringLength(36)] - public string xxqad_sct_ref { get; set; } - - public decimal xxqad_sct_cst_tot { get; set; } - - public DateTime? xxqad_sct_cst_date { get; set; } - - [StringLength(1)] - public string xxqad_sct_qadread { get; set; } - - [StringLength(1)] - public string xxqad_sct_wmsread { get; set; } - - [StringLength(1)] - public string xxqad_sct_scmread { get; set; } - - [StringLength(1)] - public string xxqad_sct_mesread { get; set; } - - public string xxqad_sct_rmks { get; set; } - - public DateTime? xxqad_sct_createdt { get; set; } - - [StringLength(8)] - public string xxqad_sct_createur { get; set; } - - public DateTime? xxqad_sct_updatedt { get; set; } - - [StringLength(8)] - public string xxqad_sct_updateur { get; set; } - } -} diff --git a/CK.SCP.Models/UniApiEntity/xxqad_sod_det.cs b/CK.SCP.Models/UniApiEntity/xxqad_sod_det.cs deleted file mode 100644 index 15d8abf..0000000 --- a/CK.SCP.Models/UniApiEntity/xxqad_sod_det.cs +++ /dev/null @@ -1,79 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; - -namespace CK.SCP.Models.UniApiEntity -{ - public partial class xxqad_sod_det - { - [Key] - public int xxqad_sod_uid { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string xxqad_sod_seq { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxqad_sod_order { get; set; } - - public int xxqad_sod_line { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxqad_sod_domain { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxqad_sod_cust { get; set; } - - [StringLength(18)] - public string xxqad_sod_part { get; set; } - - [StringLength(48)] - public string xxqad_sod_desc { get; set; } - - public decimal xxqad_sod_price { get; set; } - - [StringLength(50)] - public string xxqad_sod_shipto { get; set; } - - [StringLength(2)] - public string xxqad_sod_um { get; set; } - - [StringLength(8)] - public string xxqad_sod_site { get; set; } - - [StringLength(8)] - public string xxqad_sod_pllist { get; set; } - - [StringLength(8)] - public string xxqad_sod_loc { get; set; } - - [StringLength(10)] - public string xxqad_sod_qty_std { get; set; } - - [StringLength(1)] - public string xxqad_sod_qadread { get; set; } - - [StringLength(1)] - public string xxqad_sod_wmsread { get; set; } - - [StringLength(1)] - public string xxqad_sod_scmread { get; set; } - - [StringLength(1)] - public string xxqad_sod_mesread { get; set; } - - public string xxqad_sod_rmks { get; set; } - - public DateTime? xxqad_sod_createdt { get; set; } - - [StringLength(8)] - public string xxqad_sod_createur { get; set; } - - public DateTime? xxqad_sod_updatedt { get; set; } - - [StringLength(8)] - public string xxqad_sod_updateur { get; set; } - } -} diff --git a/CK.SCP.Models/UniApiEntity/xxqad_sprice_det.cs b/CK.SCP.Models/UniApiEntity/xxqad_sprice_det.cs deleted file mode 100644 index 14e7a14..0000000 --- a/CK.SCP.Models/UniApiEntity/xxqad_sprice_det.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; - -namespace CK.SCP.Models.UniApiEntity -{ - public partial class xxqad_sprice_det - { - [Key] - public int xxqad_sprice_uid { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string xxqad_sprice_seq { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxqad_sprice_list { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(18)] - public string xxqad_sprice_part { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxqad_sprice_domain { get; set; } - - public DateTime xxqad_sprice_start { get; set; } - - public DateTime? xxqad_sprice_end { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(3)] - public string xxqad_sprice_curr { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(2)] - public string xxqad_sprice_um { get; set; } - - public decimal? xxqad_sprice_amt { get; set; } - - [StringLength(1)] - public string xxqad_sprice_qadread { get; set; } - - [StringLength(1)] - public string xxqad_sprice_wmsread { get; set; } - - [StringLength(1)] - public string xxqad_sprice_scmread { get; set; } - - [StringLength(1)] - public string xxqad_sprice_mesread { get; set; } - - public string xxqad_sprice_rmks { get; set; } - - public DateTime? xxqad_sprice_createdt { get; set; } - - [StringLength(8)] - public string xxqad_sprice_createur { get; set; } - - public DateTime? xxqad_sprice_updatedt { get; set; } - - [StringLength(8)] - public string xxqad_sprice_updateur { get; set; } - } -} diff --git a/CK.SCP.Models/UniApiEntity/xxqad_vd_mstr.cs b/CK.SCP.Models/UniApiEntity/xxqad_vd_mstr.cs deleted file mode 100644 index f316eca..0000000 --- a/CK.SCP.Models/UniApiEntity/xxqad_vd_mstr.cs +++ /dev/null @@ -1,93 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; - -namespace CK.SCP.Models.UniApiEntity -{ - public partial class xxqad_vd_mstr - { - [Key] - public int xxqad_vd_uid { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string xxqad_vd_seq { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxqad_vd_addr { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxqad_vd_domain { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(100)] - public string xxqad_vd_name { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(100)] - public string xxqad_vd_line1 { get; set; } - - [StringLength(100)] - public string xxqad_vd_line2 { get; set; } - - [StringLength(100)] - public string xxqad_vd_line3 { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string xxqad_vd_country { get; set; } - - [StringLength(50)] - public string xxqad_vd_city { get; set; } - - [StringLength(50)] - public string xxqad_vd_phone { get; set; } - - [StringLength(50)] - public string xxqad_vd_fax { get; set; } - - [StringLength(15)] - public string xxqad_vd_pst_id { get; set; } - - [StringLength(50)] - public string xxqad_vd_attn { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(15)] - public string xxqad_vd_curr { get; set; } - - public decimal xxqad_vd_tax { get; set; } - - [StringLength(2)] - public string xxqad_vd_promo { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxqad_vd_type { get; set; } - - [StringLength(1)] - public string xxqad_vd_qadread { get; set; } - - [StringLength(1)] - public string xxqad_vd_wmsread { get; set; } - - [StringLength(1)] - public string xxqad_vd_scmread { get; set; } - - [StringLength(1)] - public string xxqad_vd_mesread { get; set; } - - public string xxqad_vd_rmks { get; set; } - - public DateTime? xxqad_vd_createdt { get; set; } - - [StringLength(8)] - public string xxqad_vd_createur { get; set; } - - public DateTime? xxqad_vd_updatedt { get; set; } - - [StringLength(8)] - public string xxqad_vd_updateur { get; set; } - } -} diff --git a/CK.SCP.Models/UniApiEntity/xxqad_vp_mstr.cs b/CK.SCP.Models/UniApiEntity/xxqad_vp_mstr.cs deleted file mode 100644 index 846c27e..0000000 --- a/CK.SCP.Models/UniApiEntity/xxqad_vp_mstr.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; - -namespace CK.SCP.Models.UniApiEntity -{ - public partial class xxqad_vp_mstr - { - [Key] - public int xxqad_vp_uid { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string xxqad_vp_seq { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxqad_vp_addr { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(18)] - public string xxqad_vp_part { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxqad_vp_domain { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(36)] - public string xxqad_vp_vend_part { get; set; } - - [StringLength(8)] - public string xxqad_vp_site { get; set; } - - public decimal xxqad_vp_comment { get; set; } - - [StringLength(1)] - public string xxqad_vp_qadread { get; set; } - - [StringLength(1)] - public string xxqad_vp_wmsread { get; set; } - - [StringLength(1)] - public string xxqad_vp_scmread { get; set; } - - [StringLength(1)] - public string xxqad_vp_mesread { get; set; } - - public string xxqad_vp_rmks { get; set; } - - public DateTime? xxqad_vp_createdt { get; set; } - - [StringLength(8)] - public string xxqad_vp_createur { get; set; } - - public DateTime? xxqad_vp_updatedt { get; set; } - - [StringLength(8)] - public string xxqad_vp_updateur { get; set; } - } -} diff --git a/CK.SCP.Models/UniApiEntity/xxscm_ctrl.cs b/CK.SCP.Models/UniApiEntity/xxscm_ctrl.cs deleted file mode 100644 index 39bc492..0000000 --- a/CK.SCP.Models/UniApiEntity/xxscm_ctrl.cs +++ /dev/null @@ -1,46 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; - -namespace CK.SCP.Models.UniApiEntity -{ - public partial class xxscm_ctrl - { - [Key] - public int xxscm_uid { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string xxscm_seq { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxscm_domain { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxscm_site { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(18)] - public string xxscm_table { get; set; } - - public int xxscm_table_qty { get; set; } - - [StringLength(1)] - public string xxscm_qad { get; set; } - - [StringLength(1)] - public string xxscm_mes { get; set; } - - [StringLength(1)] - public string xxscm_scm { get; set; } - - [StringLength(1)] - public string xxscm_wms { get; set; } - - [Required(AllowEmptyStrings = true)] - public string xxscm_rmks { get; set; } - - public DateTime xxscm_create_time { get; set; } - } -} diff --git a/CK.SCP.Models/UniApiEntity/xxscm_inv_det.cs b/CK.SCP.Models/UniApiEntity/xxscm_inv_det.cs deleted file mode 100644 index 2e0a916..0000000 --- a/CK.SCP.Models/UniApiEntity/xxscm_inv_det.cs +++ /dev/null @@ -1,92 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; - -namespace CK.SCP.Models.UniApiEntity -{ - public partial class xxscm_inv_det - { - [Key] - public int xxscm_inv_uid { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string xxscm_inv_seq { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxscm_inv_domain { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxscm_inv_site { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(10)] - public string xxscm_inv_nbr { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(10)] - public string xxscm_inv_vend { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(10)] - public string xxscm_inv_invoice { get; set; } - - public DateTime xxscm_inv_date { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(10)] - public string xxscm_inv_curr { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(10)] - public string xxscm_inv_order { get; set; } - - [StringLength(10)] - public string xxscm_inv_line { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(10)] - public string xxscm_inv_receiver { get; set; } - - [StringLength(10)] - public string xxscm_inv_asn { get; set; } - - [StringLength(10)] - public string xxscm_inv_part { get; set; } - - public decimal xxscm_inv_qty { get; set; } - - public decimal xxscm_inv_price { get; set; } - - public decimal xxscm_inv_tax { get; set; } - - public decimal xxscm_inv_taxamt { get; set; } - - public decimal xxscm_inv_amt { get; set; } - - [StringLength(1)] - public string xxscm_inv_qadread { get; set; } - - [StringLength(1)] - public string xxscm_inv_wmsread { get; set; } - - [StringLength(1)] - public string xxscm_inv_scmread { get; set; } - - [StringLength(1)] - public string xxscm_inv_mesread { get; set; } - - public string xxscm_inv_rmks { get; set; } - - public DateTime? xxscm_inv_createdt { get; set; } - - [StringLength(8)] - public string xxscm_inv_createur { get; set; } - - public DateTime? xxscm_inv_updatedt { get; set; } - - [StringLength(8)] - public string xxscm_inv_updateur { get; set; } - } -} diff --git a/CK.SCP.Models/UniApiEntity/xxscm_pod_det.cs b/CK.SCP.Models/UniApiEntity/xxscm_pod_det.cs deleted file mode 100644 index 8331fe7..0000000 --- a/CK.SCP.Models/UniApiEntity/xxscm_pod_det.cs +++ /dev/null @@ -1,121 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; - -namespace CK.SCP.Models.UniApiEntity -{ - public partial class xxscm_pod_det - { - [Key] - public int xxscm_pod_uid { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string xxscm_pod_seq { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxscm_pod_nbr { get; set; } - - public int xxscm_pod_line { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxscm_pod_modtype { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxscm_pod_site { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxscm_pod_domain { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(18)] - public string xxscm_pod_part { get; set; } - - [StringLength(50)] - public string xxscm_pod_desc { get; set; } - - public decimal xxscm_pod_qty_ord { get; set; } - - public decimal xxscm_pod_qty_rct { get; set; } - - public decimal xxscm_pod_qty_std { get; set; } - - public DateTime xxscm_pod_due_date { get; set; } - - public decimal xxscm_pod_price { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxscm_pod_curr { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxscm_pod_loc_um { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxscm_pod_um { get; set; } - - public decimal xxscm_pod_um_conv { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxscm_pod_vend { get; set; } - - [StringLength(100)] - public string xxscm_pod_name { get; set; } - - [StringLength(8)] - public string xxscm_pod_attn { get; set; } - - [StringLength(8)] - public string xxscm_pod_ship { get; set; } - - [StringLength(2)] - public string xxscm_pod_made { get; set; } - - public bool xxscm_pod_confirm { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxscm_pod_buyer { get; set; } - - [StringLength(20)] - public string xxscm_pod_buyer_phone { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxscm_pod_status { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(1)] - public string xxscm_pod_qadread { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(1)] - public string xxscm_pod_wmsread { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(1)] - public string xxscm_pod_scmread { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(1)] - public string xxscm_pod_mesread { get; set; } - - public string xxscm_pod_rmks { get; set; } - - public DateTime? xxscm_pod_createdt { get; set; } - - [StringLength(8)] - public string xxscm_pod_createur { get; set; } - - public DateTime? xxscm_pod_updatedt { get; set; } - - [StringLength(8)] - public string xxscm_pod_updateur { get; set; } - } -} diff --git a/CK.SCP.Models/UniApiEntity/xxscm_tx_det.cs b/CK.SCP.Models/UniApiEntity/xxscm_tx_det.cs deleted file mode 100644 index 218b5a9..0000000 --- a/CK.SCP.Models/UniApiEntity/xxscm_tx_det.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; - -namespace CK.SCP.Models.UniApiEntity -{ - public partial class xxscm_tx_det - { - [Key] - public int xxscm_tx_uid { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string xxscm_tx_seq { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxscm_tx_domain { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(200)] - public string xxscm_tx_boxcode { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(20)] - public string xxscm_tx_nbr { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string xxscm_tx_vend { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(18)] - public string xxscm_tx_part { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string xxscm_tx_batch { get; set; } - - public decimal xxscm_tx_qty_real { get; set; } - - [StringLength(1)] - public string xxscm_tx_qadread { get; set; } - - [StringLength(1)] - public string xxscm_tx_wmsread { get; set; } - - [StringLength(1)] - public string xxscm_tx_scmread { get; set; } - - [StringLength(1)] - public string xxscm_tx_mesread { get; set; } - - public string xxscm_tx_rmks { get; set; } - - public DateTime? xxscm_tx_createdt { get; set; } - - [StringLength(8)] - public string xxscm_tx_createur { get; set; } - - public DateTime? xxscm_tx_updatedt { get; set; } - - [StringLength(8)] - public string xxscm_tx_updateur { get; set; } - } -} diff --git a/CK.SCP.Models/UniApiEntity/xxscm_tx_mstr.cs b/CK.SCP.Models/UniApiEntity/xxscm_tx_mstr.cs deleted file mode 100644 index 2be6ffd..0000000 --- a/CK.SCP.Models/UniApiEntity/xxscm_tx_mstr.cs +++ /dev/null @@ -1,105 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; - -namespace CK.SCP.Models.UniApiEntity -{ - public partial class xxscm_tx_mstr - { - [Key] - public int xxscm_tx_uid { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string xxscm_tx_seq { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(20)] - public string xxscm_tx_nbr { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxscm_tx_po_nbr { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(4)] - public string xxscm_tx_po_line { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(18)] - public string xxscm_tx_part { get; set; } - - public decimal xxscm_tx_qty_total { get; set; } - - public decimal xxscm_tx_qty_std { get; set; } - - public DateTime xxscm_tx_date_ship { get; set; } - - public DateTime xxscm_tx_date_Promise { get; set; } - - public DateTime xxscm_tx_date_due { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxscm_tx_domain { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxscm_tx_site { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxscm_tx_vend { get; set; } - - [StringLength(20)] - public string xxscm_tx_ware_class { get; set; } - - [StringLength(20)] - public string xxscm_tx_ware { get; set; } - - public decimal xxscm_tx_pprice { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(2)] - public string xxscm_tx_po_um { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(2)] - public string xxscm_tx_loc_um { get; set; } - - public decimal xxscm_tx_conv { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxscm_tx_type { get; set; } - - [StringLength(20)] - public string xxscm_tx_vend_batch { get; set; } - - [StringLength(1)] - public string xxscm_tx_qadread { get; set; } - - [StringLength(1)] - public string xxscm_tx_wmsread { get; set; } - - [StringLength(1)] - public string xxscm_tx_scmread { get; set; } - - [StringLength(1)] - public string xxscm_tx_mesread { get; set; } - - public string xxscm_tx_rmks { get; set; } - - public DateTime? xxscm_tx_createdt { get; set; } - - [StringLength(8)] - public string xxscm_tx_createur { get; set; } - - public DateTime? xxscm_tx_updatedt { get; set; } - - [StringLength(8)] - public string xxscm_tx_updateur { get; set; } - - [StringLength(8)] - public string xxscm_tx_status { get; set; } - } -} diff --git a/CK.SCP.Models/UniApiEntity/xxwms_bk_mstr.cs b/CK.SCP.Models/UniApiEntity/xxwms_bk_mstr.cs deleted file mode 100644 index b4beb26..0000000 --- a/CK.SCP.Models/UniApiEntity/xxwms_bk_mstr.cs +++ /dev/null @@ -1,84 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; - -namespace CK.SCP.Models.UniApiEntity -{ - public partial class xxwms_bk_mstr - { - [Key] - public int xxwms_bk_uid { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string xxwms_bk_seq { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(20)] - public string xxwms_bk_nbr { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(18)] - public string xxwms_bk_part { get; set; } - - public DateTime xxwms_bk_date { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxwms_bk_site { get; set; } - - public int xxwms_bk_op { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxwms_bk_line { get; set; } - - [StringLength(18)] - public string xxwms_bk_lot { get; set; } - - public decimal xxwms_bk_qty { get; set; } - - public decimal xxwms_bk_qty_scrap { get; set; } - - public decimal xxwms_bk_qty_reject { get; set; } - - public decimal xxwms_bk_qty_receipt { get; set; } - - public DateTime xxwms_bk_time { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxwms_bk_loc { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(2)] - public string xxwms_bk_um { get; set; } - - [StringLength(1)] - public string xxwms_bk_qadread { get; set; } - - [StringLength(1)] - public string xxwms_bk_wmsread { get; set; } - - [StringLength(1)] - public string xxwms_bk_scmread { get; set; } - - [StringLength(1)] - public string xxwms_bk_mesread { get; set; } - - public string xxwms_bk_rmks { get; set; } - - public DateTime? xxwms_bk_createdt { get; set; } - - [StringLength(18)] - public string xxwms_bk_createur { get; set; } - - public DateTime? xxwms_bk_updatedt { get; set; } - - [StringLength(18)] - public string xxwms_bk_updateur { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(20)] - public string xxwms_bk_domain { get; set; } - } -} diff --git a/CK.SCP.Models/UniApiEntity/xxwms_ctrl.cs b/CK.SCP.Models/UniApiEntity/xxwms_ctrl.cs deleted file mode 100644 index ee4baf9..0000000 --- a/CK.SCP.Models/UniApiEntity/xxwms_ctrl.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace CK.SCP.Models.UniApiEntity -{ - public partial class xxwms_ctrl - { - [DatabaseGenerated(DatabaseGeneratedOption.Identity)] - public int xxwms_uid { get; set; } - - [Key] - [StringLength(50)] - public string xxwms_seq { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string xxwms_table { get; set; } - - public int xxwms_table_qty { get; set; } - - [StringLength(1)] - public string xxwms_qad { get; set; } - - [StringLength(1)] - public string xxwms_mes { get; set; } - - [StringLength(1)] - public string xxwms_scm { get; set; } - - [StringLength(1)] - public string xxwms_wms { get; set; } - - public string xxwms_rmks { get; set; } - - public DateTime xxwms_create_time { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(20)] - public string xxwms_domain { get; set; } - - [StringLength(8)] - public string xxwms_site { get; set; } - } -} diff --git a/CK.SCP.Models/UniApiEntity/xxwms_iss_det.cs b/CK.SCP.Models/UniApiEntity/xxwms_iss_det.cs deleted file mode 100644 index 9c3af5d..0000000 --- a/CK.SCP.Models/UniApiEntity/xxwms_iss_det.cs +++ /dev/null @@ -1,79 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; - -namespace CK.SCP.Models.UniApiEntity -{ - public partial class xxwms_iss_det - { - [Key] - public int xxwms_iss_uid { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string xxwms_iss_seq { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(20)] - public string xxwms_iss_nbr { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxwms_iss_site { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(18)] - public string xxwms_iss_part { get; set; } - - [StringLength(10)] - public string xxwms_iss_lot { get; set; } - - public decimal xxwms_iss_qty { get; set; } - - public DateTime xxwms_iss_date { get; set; } - - public DateTime xxwms_iss_time { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxwms_iss_loc { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(2)] - public string xxwms_iss_um { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(100)] - public string xxwms_iss_reason { get; set; } - - [StringLength(1)] - public string xxwms_iss_qadread { get; set; } - - [StringLength(1)] - public string xxwms_iss_wmsread { get; set; } - - [StringLength(1)] - public string xxwms_iss_scmread { get; set; } - - [StringLength(1)] - public string xxwms_iss_mesread { get; set; } - - public string xxwms_iss_rmks { get; set; } - - public DateTime? xxwms_iss_createdt { get; set; } - - [StringLength(18)] - public string xxwms_iss_createur { get; set; } - - public DateTime? xxwms_iss_updatedt { get; set; } - - [StringLength(18)] - public string xxwms_iss_updateur { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(20)] - public string xxwms_iss_domain { get; set; } - - [StringLength(8)] - public string xxwms_iss_project { get; set; } - } -} diff --git a/CK.SCP.Models/UniApiEntity/xxwms_ld_det.cs b/CK.SCP.Models/UniApiEntity/xxwms_ld_det.cs deleted file mode 100644 index f75a87e..0000000 --- a/CK.SCP.Models/UniApiEntity/xxwms_ld_det.cs +++ /dev/null @@ -1,76 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; - -namespace CK.SCP.Models.UniApiEntity -{ - public partial class xxwms_ld_det - { - [Key] - public int xxwms_ld_uid { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string xxwms_ld_seq { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(4)] - public string xxwms_ld_site { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(18)] - public string xxwms_ld_part { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxwms_ld_vend { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxwms_ld_loc { get; set; } - - [StringLength(20)] - public string xxwms_ld_lot { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(20)] - public string xxwms_ld_vend_batch { get; set; } - - public decimal xxwms_ld_qty { get; set; } - - public DateTime xxwms_ld_date { get; set; } - - public DateTime xxwms_ld_time { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(2)] - public string xxwms_ld_um { get; set; } - - [StringLength(1)] - public string xxwms_ld_qadread { get; set; } - - [StringLength(1)] - public string xxwms_ld_wmsread { get; set; } - - [StringLength(1)] - public string xxwms_ld_scmread { get; set; } - - [StringLength(1)] - public string xxwms_ld_mesread { get; set; } - - public string xxwms_ld_rmks { get; set; } - - public DateTime? xxwms_ld_createdt { get; set; } - - [StringLength(18)] - public string xxwms_ld_createur { get; set; } - - public DateTime? xxwms_ld_updatedt { get; set; } - - [StringLength(18)] - public string xxwms_ld_updateur { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(20)] - public string xxwms_ld_domain { get; set; } - } -} diff --git a/CK.SCP.Models/UniApiEntity/xxwms_rc_det.cs b/CK.SCP.Models/UniApiEntity/xxwms_rc_det.cs deleted file mode 100644 index 1a3b07e..0000000 --- a/CK.SCP.Models/UniApiEntity/xxwms_rc_det.cs +++ /dev/null @@ -1,98 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; - -namespace CK.SCP.Models.UniApiEntity -{ - public partial class xxwms_rc_det - { - [Key] - public int xxwms_rc_uid { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string xxwms_rc_seq { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(20)] - public string xxwms_rc_nbr { get; set; } - - [StringLength(20)] - public string xxwms_rc_ps_nbr { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxwms_rc_po_nbr { get; set; } - - public int xxwms_rc_po_line { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(18)] - public string xxwms_rc_part { get; set; } - - public decimal xxwms_rc_qty_total { get; set; } - - public DateTime xxwms_rc_date_ship { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxwms_rc_site { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxwms_rc_vend { get; set; } - - [StringLength(20)] - public string xxwms_rc_ware_class { get; set; } - - [StringLength(20)] - public string xxwms_rc_ware { get; set; } - - [StringLength(8)] - public string xxwms_rc_loc { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(2)] - public string xxwms_rc_po_um { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(2)] - public string xxwms_rc_loc_um { get; set; } - - public decimal xxwms_rc_conv { get; set; } - - [StringLength(20)] - public string xxwms_rc_lot { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(20)] - public string xxwms_rc_vend_batch { get; set; } - - [StringLength(1)] - public string xxwms_rc_qadread { get; set; } - - [StringLength(1)] - public string xxwms_rc_wmsread { get; set; } - - [StringLength(1)] - public string xxwms_rc_scmread { get; set; } - - [StringLength(1)] - public string xxwms_rc_mesread { get; set; } - - public string xxwms_rc_rmks { get; set; } - - public DateTime? xxwms_rc_createdt { get; set; } - - [StringLength(18)] - public string xxwms_rc_createur { get; set; } - - public DateTime? xxwms_rc_updatedt { get; set; } - - [StringLength(18)] - public string xxwms_rc_updateur { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(20)] - public string xxwms_rc_domain { get; set; } - } -} diff --git a/CK.SCP.Models/UniApiEntity/xxwms_rct_det.cs b/CK.SCP.Models/UniApiEntity/xxwms_rct_det.cs deleted file mode 100644 index 7336e4d..0000000 --- a/CK.SCP.Models/UniApiEntity/xxwms_rct_det.cs +++ /dev/null @@ -1,79 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; - -namespace CK.SCP.Models.UniApiEntity -{ - public partial class xxwms_rct_det - { - [Key] - public int xxwms_rct_uid { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string xxwms_rct_seq { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(20)] - public string xxwms_rct_nbr { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxwms_rct_site { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(18)] - public string xxwms_rct_part { get; set; } - - [StringLength(8)] - public string xxwms_rct_lot { get; set; } - - public decimal xxwms_rct_qty { get; set; } - - public DateTime xxwms_rct_date { get; set; } - - public DateTime xxwms_rct_time { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxwms_rct_loc { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(2)] - public string xxwms_rct_um { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(100)] - public string xxwms_rct_reason { get; set; } - - [StringLength(1)] - public string xxwms_rct_qadread { get; set; } - - [StringLength(1)] - public string xxwms_rct_wmsread { get; set; } - - [StringLength(1)] - public string xxwms_rct_scmread { get; set; } - - [StringLength(1)] - public string xxwms_rct_mesread { get; set; } - - public string xxwms_rct_rmks { get; set; } - - public DateTime? xxwms_rct_createdt { get; set; } - - [StringLength(18)] - public string xxwms_rct_createur { get; set; } - - public DateTime? xxwms_rct_updatedt { get; set; } - - [StringLength(18)] - public string xxwms_rct_updateur { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(20)] - public string xxwms_rct_domain { get; set; } - - [StringLength(8)] - public string xxwms_rct_project { get; set; } - } -} diff --git a/CK.SCP.Models/UniApiEntity/xxwms_rt_det.cs b/CK.SCP.Models/UniApiEntity/xxwms_rt_det.cs deleted file mode 100644 index 20ffb30..0000000 --- a/CK.SCP.Models/UniApiEntity/xxwms_rt_det.cs +++ /dev/null @@ -1,95 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; - -namespace CK.SCP.Models.UniApiEntity -{ - public partial class xxwms_rt_det - { - [Key] - public int xxwms_rt_uid { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string xxwms_rt_seq { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(20)] - public string xxwms_rt_nbr { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxwms_rt_po_nbr { get; set; } - - public int xxwms_rt_po_line { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(18)] - public string xxwms_rt_part { get; set; } - - public decimal xxwms_rt_qty_total { get; set; } - - public DateTime xxwms_rt_date_ship { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxwms_rt_site { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxwms_rt_vend { get; set; } - - [StringLength(20)] - public string xxwms_rt_ware_class { get; set; } - - [StringLength(20)] - public string xxwms_rt_ware { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxwms_rt_loc { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(2)] - public string xxwms_rt_po_um { get; set; } - - [StringLength(2)] - public string xxwms_rt_loc_um { get; set; } - - public decimal xxwms_rt_conv { get; set; } - - [StringLength(10)] - public string xxwms_rt_lot { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(20)] - public string xxwms_rt_vend_batch { get; set; } - - [StringLength(1)] - public string xxwms_rt_qadread { get; set; } - - [StringLength(1)] - public string xxwms_rt_wmsread { get; set; } - - [StringLength(1)] - public string xxwms_rt_scmread { get; set; } - - [StringLength(1)] - public string xxwms_rt_mesread { get; set; } - - public string xxwms_rt_rmks { get; set; } - - public DateTime? xxwms_rt_createdt { get; set; } - - [StringLength(18)] - public string xxwms_rt_createur { get; set; } - - public DateTime? xxwms_rt_updatedt { get; set; } - - [StringLength(18)] - public string xxwms_rt_updateur { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(20)] - public string xxwms_rt_domain { get; set; } - } -} diff --git a/CK.SCP.Models/UniApiEntity/xxwms_soiss_det.cs b/CK.SCP.Models/UniApiEntity/xxwms_soiss_det.cs deleted file mode 100644 index ed346dd..0000000 --- a/CK.SCP.Models/UniApiEntity/xxwms_soiss_det.cs +++ /dev/null @@ -1,72 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; - -namespace CK.SCP.Models.UniApiEntity -{ - public partial class xxwms_soiss_det - { - [Key] - public int xxwms_soiss_uid { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string xxwms_soiss_seq { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(20)] - public string xxwms_soiss_nbr { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(10)] - public string xxwms_soiss_order { get; set; } - - public int xxwms_soiss_line { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(18)] - public string xxwms_soiss_part { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxwms_soiss_loc { get; set; } - - public DateTime xxwms_soiss_date { get; set; } - - public decimal xxwms_soiss_qty { get; set; } - - [StringLength(8)] - public string xxwms_soiss_lot { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxwms_soiss_site { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxwms_soiss_domain { get; set; } - - [StringLength(1)] - public string xxwms_soiss_qadread { get; set; } - - [StringLength(1)] - public string xxwms_soiss_wmsread { get; set; } - - [StringLength(1)] - public string xxwms_soiss_scmread { get; set; } - - [StringLength(1)] - public string xxwms_soiss_mesread { get; set; } - - public string xxwms_soiss_rmks { get; set; } - - public DateTime? xxwms_soiss_createdt { get; set; } - - [StringLength(18)] - public string xxwms_soiss_createur { get; set; } - - public DateTime? xxwms_soiss_updatedt { get; set; } - - [StringLength(18)] - public string xxwms_soiss_updateur { get; set; } - } -} diff --git a/CK.SCP.Models/UniApiEntity/xxwms_tag_det.cs b/CK.SCP.Models/UniApiEntity/xxwms_tag_det.cs deleted file mode 100644 index 1ad668f..0000000 --- a/CK.SCP.Models/UniApiEntity/xxwms_tag_det.cs +++ /dev/null @@ -1,66 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; - -namespace CK.SCP.Models.UniApiEntity -{ - public partial class xxwms_tag_det - { - [Key] - public int xxwms_tag_uid { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string xxwms_tag_seq { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(20)] - public string xxwms_tag_nbr { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(18)] - public string xxwms_tag_part { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxwms_tag_loc { get; set; } - - [StringLength(8)] - public string xxwms_tag_lot { get; set; } - - public DateTime xxwms_tag_date { get; set; } - - public decimal xxwms_tag_var_qty { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxwms_tag_site { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxwms_tag_domain { get; set; } - - [StringLength(1)] - public string xxwms_tag_qadread { get; set; } - - [StringLength(1)] - public string xxwms_tag_wmsread { get; set; } - - [StringLength(1)] - public string xxwms_tag_scmread { get; set; } - - [StringLength(1)] - public string xxwms_tag_mesread { get; set; } - - public string xxwms_tag_rmks { get; set; } - - public DateTime? xxwms_tag_createdt { get; set; } - - [StringLength(18)] - public string xxwms_tag_createur { get; set; } - - public DateTime? xxwms_tag_updatedt { get; set; } - - [StringLength(18)] - public string xxwms_tag_updateur { get; set; } - } -} diff --git a/CK.SCP.Models/UniApiEntity/xxwms_tr_det.cs b/CK.SCP.Models/UniApiEntity/xxwms_tr_det.cs deleted file mode 100644 index 4902dfb..0000000 --- a/CK.SCP.Models/UniApiEntity/xxwms_tr_det.cs +++ /dev/null @@ -1,74 +0,0 @@ -using System; -using System.ComponentModel.DataAnnotations; - -namespace CK.SCP.Models.UniApiEntity -{ - public partial class xxwms_tr_det - { - [Key] - public int xxwms_tr_uid { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(50)] - public string xxwms_tr_seq { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(20)] - public string xxwms_tr_nbr { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxwms_tr_site { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(18)] - public string xxwms_tr_part { get; set; } - - [StringLength(18)] - public string xxwms_tr_lot { get; set; } - - public decimal xxwms_tr_qty { get; set; } - - public DateTime xxwms_tr_date { get; set; } - - public DateTime xxwms_tr_time { get; set; } - - [StringLength(8)] - public string xxwms_tr_loc1 { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(8)] - public string xxwms_tr_loc2 { get; set; } - - [StringLength(2)] - public string xxwms_tr_um { get; set; } - - [StringLength(1)] - public string xxwms_tr_qadread { get; set; } - - [StringLength(1)] - public string xxwms_tr_wmsread { get; set; } - - [StringLength(1)] - public string xxwms_tr_scmread { get; set; } - - [StringLength(1)] - public string xxwms_tr_mesread { get; set; } - - public string xxwms_tr_rmks { get; set; } - - public DateTime? xxwms_tr_createdt { get; set; } - - [StringLength(18)] - public string xxwms_tr_createur { get; set; } - - public DateTime? xxwms_tr_updatedt { get; set; } - - [StringLength(18)] - public string xxwms_tr_updateur { get; set; } - - [Required(AllowEmptyStrings = true)] - [StringLength(20)] - public string xxwms_tr_domain { get; set; } - } -} diff --git a/CK.SCP.Models/packages.config b/CK.SCP.Models/packages.config deleted file mode 100644 index 2cd31a5..0000000 --- a/CK.SCP.Models/packages.config +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<packages> - <package id="EntityFramework" version="6.2.0" targetFramework="net452" /> - <package id="EntityFramework.zh-Hans" version="6.2.0" targetFramework="net452" /> - <package id="Newtonsoft.Json" version="10.0.3" targetFramework="net452" /> -</packages> \ No newline at end of file diff --git a/CK.SCP.UniApi_CQ/App (2).config b/CK.SCP.UniApi_CQ/App (2).config deleted file mode 100644 index 286b0f3..0000000 --- a/CK.SCP.UniApi_CQ/App (2).config +++ /dev/null @@ -1,32 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<configuration> - <configSections> - - <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> - <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --></configSections> - <startup> - <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" /> - </startup> - <entityFramework> - <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework"> - <parameters> - <parameter value="mssqllocaldb" /> - </parameters> - </defaultConnectionFactory> - <providers> - <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" /> - </providers> - </entityFramework> - <runtime> - <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> - <dependentAssembly> - <assemblyIdentity name="EntityFramework" publicKeyToken="b77a5c561934e089" culture="neutral" /> - <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" /> - </dependentAssembly> - <dependentAssembly> - <assemblyIdentity name="EPPlus" publicKeyToken="ea159fdaa78159a1" culture="neutral" /> - <bindingRedirect oldVersion="0.0.0.0-4.5.2.1" newVersion="4.5.2.1" /> - </dependentAssembly> - </assemblyBinding> - </runtime> -</configuration> \ No newline at end of file diff --git a/CK.SCP.UniApi_CQ/App.config b/CK.SCP.UniApi_CQ/App.config deleted file mode 100644 index 286b0f3..0000000 --- a/CK.SCP.UniApi_CQ/App.config +++ /dev/null @@ -1,32 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<configuration> - <configSections> - - <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> - <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --></configSections> - <startup> - <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" /> - </startup> - <entityFramework> - <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework"> - <parameters> - <parameter value="mssqllocaldb" /> - </parameters> - </defaultConnectionFactory> - <providers> - <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" /> - </providers> - </entityFramework> - <runtime> - <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> - <dependentAssembly> - <assemblyIdentity name="EntityFramework" publicKeyToken="b77a5c561934e089" culture="neutral" /> - <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" /> - </dependentAssembly> - <dependentAssembly> - <assemblyIdentity name="EPPlus" publicKeyToken="ea159fdaa78159a1" culture="neutral" /> - <bindingRedirect oldVersion="0.0.0.0-4.5.2.1" newVersion="4.5.2.1" /> - </dependentAssembly> - </assemblyBinding> - </runtime> -</configuration> \ No newline at end of file diff --git a/CK.SCP.UniApi_CQ/AppBox数据库设置.ini b/CK.SCP.UniApi_CQ/AppBox数据库设置.ini deleted file mode 100644 index 057afcc..0000000 --- a/CK.SCP.UniApi_CQ/AppBox数据库设置.ini +++ /dev/null @@ -1,8 +0,0 @@ -{ - "ݿ": "SQLServer", - "ַ": "127.0.0.1", - "˿": "1433", - "ݿ": "SCPAppBox", - "û": "sa", - "": "EF0D2F0DD771412E" -} \ No newline at end of file diff --git a/CK.SCP.UniApi_CQ/CK.SCP.GrupUniApi.csproj b/CK.SCP.UniApi_CQ/CK.SCP.GrupUniApi.csproj deleted file mode 100644 index 733061c..0000000 --- a/CK.SCP.UniApi_CQ/CK.SCP.GrupUniApi.csproj +++ /dev/null @@ -1,192 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> - <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProjectGuid>{6A22F275-D490-46B3-B183-35408BF106C4}</ProjectGuid> - <OutputType>WinExe</OutputType> - <RootNamespace>CK.SCP.UniApi</RootNamespace> - <AssemblyName>CK.SCP.UniApi</AssemblyName> - <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion> - <FileAlignment>512</FileAlignment> - <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> - <PublishUrl>publish\</PublishUrl> - <Install>true</Install> - <InstallFrom>Disk</InstallFrom> - <UpdateEnabled>false</UpdateEnabled> - <UpdateMode>Foreground</UpdateMode> - <UpdateInterval>7</UpdateInterval> - <UpdateIntervalUnits>Days</UpdateIntervalUnits> - <UpdatePeriodically>false</UpdatePeriodically> - <UpdateRequired>false</UpdateRequired> - <MapFileExtensions>true</MapFileExtensions> - <ApplicationRevision>0</ApplicationRevision> - <ApplicationVersion>1.0.0.%2a</ApplicationVersion> - <IsWebBootstrapper>false</IsWebBootstrapper> - <UseApplicationTrust>false</UseApplicationTrust> - <BootstrapperEnabled>true</BootstrapperEnabled> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <PlatformTarget>AnyCPU</PlatformTarget> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <PlatformTarget>AnyCPU</PlatformTarget> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>bin\Release\</OutputPath> - <DefineConstants>TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <ItemGroup> - <Reference Include="DevComponents.DotNetBar.Layout, Version=14.1.0.21, Culture=neutral, PublicKeyToken=7eb7c3a35b91de04, processorArchitecture=MSIL"> - <SpecificVersion>False</SpecificVersion> - <HintPath>..\DLL\DevComponents.DotNetBar.Layout.dll</HintPath> - </Reference> - <Reference Include="DevComponents.DotNetBar2, Version=14.1.0.21, Culture=neutral, PublicKeyToken=7eb7c3a35b91de04, processorArchitecture=MSIL"> - <SpecificVersion>False</SpecificVersion> - <HintPath>..\DLL\DevComponents.DotNetBar2.dll</HintPath> - </Reference> - <Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> - <HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll</HintPath> - </Reference> - <Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> - <HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll</HintPath> - </Reference> - <Reference Include="Newtonsoft.Json"> - <HintPath>..\packages\Newtonsoft.Json.10.0.3\lib\net20\Newtonsoft.Json.dll</HintPath> - </Reference> - <Reference Include="System" /> - <Reference Include="System.ComponentModel.DataAnnotations" /> - <Reference Include="System.Core" /> - <Reference Include="System.Transactions" /> - <Reference Include="System.Xml.Linq" /> - <Reference Include="System.Data.DataSetExtensions" /> - <Reference Include="Microsoft.CSharp" /> - <Reference Include="System.Data" /> - <Reference Include="System.Deployment" /> - <Reference Include="System.Drawing" /> - <Reference Include="System.Net.Http" /> - <Reference Include="System.Windows.Forms" /> - <Reference Include="System.Xml" /> - </ItemGroup> - <ItemGroup> - <Compile Include="CktUniApiButton.cs"> - <SubType>UserControl</SubType> - </Compile> - <Compile Include="CktUniApiButton.Designer.cs"> - <DependentUpon>CktUniApiButton.cs</DependentUpon> - </Compile> - <Compile Include="Controller\OdbcApiWmsController.cs" /> - <Compile Include="UniApiController.cs" /> - <Compile Include="Config\ApiType.cs" /> - <Compile Include="Config\CommonConfig.cs" /> - <Compile Include="Config\DurationConfig.cs" /> - <Compile Include="Config\FtpConfig.cs" /> - <Compile Include="Config\UniApiConfig.cs" /> - <Compile Include="Controller\OdbcApiQadController.cs" /> - <Compile Include="Controller\OdbcApiScpController.cs" /> - <Compile Include="FormMain.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="FormMain.Designer.cs"> - <DependentUpon>FormMain.cs</DependentUpon> - </Compile> - <Compile Include="GlobalVar.cs" /> - <Compile Include="IApi.cs" /> - <Compile Include="PopupSetting.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="PopupSetting.Designer.cs"> - <DependentUpon>PopupSetting.cs</DependentUpon> - </Compile> - <Compile Include="Program.cs" /> - <Compile Include="Properties\AssemblyInfo.cs" /> - <Compile Include="QadOdbcApi.cs" /> - <Compile Include="StringRedir.cs" /> - <EmbeddedResource Include="CktUniApiButton.resx"> - <DependentUpon>CktUniApiButton.cs</DependentUpon> - </EmbeddedResource> - <EmbeddedResource Include="FormMain.resx"> - <DependentUpon>FormMain.cs</DependentUpon> - </EmbeddedResource> - <EmbeddedResource Include="PopupSetting.resx"> - <DependentUpon>PopupSetting.cs</DependentUpon> - </EmbeddedResource> - <EmbeddedResource Include="Properties\Resources.resx"> - <Generator>ResXFileCodeGenerator</Generator> - <LastGenOutput>Resources.Designer.cs</LastGenOutput> - <SubType>Designer</SubType> - </EmbeddedResource> - <Compile Include="Properties\Resources.Designer.cs"> - <AutoGen>True</AutoGen> - <DependentUpon>Resources.resx</DependentUpon> - <DesignTime>True</DesignTime> - </Compile> - <None Include="AppBox数据库设置.ini" /> - <None Include="ClassDiagram1.cd" /> - <None Include="ERP接口设置.ini" /> - <None Include="packages.config" /> - <None Include="Properties\Settings.settings"> - <Generator>SettingsSingleFileGenerator</Generator> - <LastGenOutput>Settings.Designer.cs</LastGenOutput> - </None> - <Compile Include="Properties\Settings.Designer.cs"> - <AutoGen>True</AutoGen> - <DependentUpon>Settings.settings</DependentUpon> - <DesignTimeSharedInput>True</DesignTimeSharedInput> - </Compile> - <None Include="Scp数据库设置.ini" /> - <None Include="执行周期设置.ini" /> - <None Include="接口数据库设置.ini" /> - <None Include="通用设置.ini" /> - </ItemGroup> - <ItemGroup> - <None Include="App.config" /> - </ItemGroup> - <ItemGroup> - <Content Include="interface.ico" /> - </ItemGroup> - <ItemGroup> - <ProjectReference Include="..\Common\CK.SCP.Common.csproj"> - <Project>{3d6090ab-2f0c-4350-aef3-59dd73eab1aa}</Project> - <Name>CK.SCP.Common</Name> - </ProjectReference> - <ProjectReference Include="..\Controller\CK.SCP.Controller.csproj"> - <Project>{D096D4FF-9546-4137-9A02-9070E70DC760}</Project> - <Name>CK.SCP.Controller</Name> - </ProjectReference> - <ProjectReference Include="..\Models\CK.SCP.Models.csproj"> - <Project>{74dce5f2-a501-45f2-b4f9-494aa1867226}</Project> - <Name>CK.SCP.Models</Name> - </ProjectReference> - <ProjectReference Include="..\Utils\CK.SCP.Utils.csproj"> - <Project>{4c6a951d-ad7f-47ce-b2ce-32c205d8d6ba}</Project> - <Name>CK.SCP.Utils</Name> - </ProjectReference> - </ItemGroup> - <ItemGroup> - <WCFMetadata Include="Service References\" /> - </ItemGroup> - <ItemGroup> - <BootstrapperPackage Include=".NETFramework,Version=v4.5.2"> - <Visible>False</Visible> - <ProductName>Microsoft .NET Framework 4.5.2 %28x86 和 x64%29</ProductName> - <Install>true</Install> - </BootstrapperPackage> - <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1"> - <Visible>False</Visible> - <ProductName>.NET Framework 3.5 SP1</ProductName> - <Install>false</Install> - </BootstrapperPackage> - </ItemGroup> - <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> -</Project> \ No newline at end of file diff --git a/CK.SCP.UniApi_CQ/CK.SCP.UniApi_CQ.csproj b/CK.SCP.UniApi_CQ/CK.SCP.UniApi_CQ.csproj deleted file mode 100644 index 2bb6371..0000000 --- a/CK.SCP.UniApi_CQ/CK.SCP.UniApi_CQ.csproj +++ /dev/null @@ -1,87 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> - <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProjectGuid>{5D5E1718-A898-45EE-A45E-69C80AE3F947}</ProjectGuid> - <OutputType>WinExe</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> - <RootNamespace>CK.SCP.UniApi_CQ</RootNamespace> - <AssemblyName>CK.SCP.UniApi_CQ</AssemblyName> - <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion> - <FileAlignment>512</FileAlignment> - <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <PlatformTarget>AnyCPU</PlatformTarget> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <PlatformTarget>AnyCPU</PlatformTarget> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>bin\Release\</OutputPath> - <DefineConstants>TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <ItemGroup> - <Reference Include="System" /> - <Reference Include="System.Core" /> - <Reference Include="System.Xml.Linq" /> - <Reference Include="System.Data.DataSetExtensions" /> - <Reference Include="Microsoft.CSharp" /> - <Reference Include="System.Data" /> - <Reference Include="System.Deployment" /> - <Reference Include="System.Drawing" /> - <Reference Include="System.Net.Http" /> - <Reference Include="System.Windows.Forms" /> - <Reference Include="System.Xml" /> - </ItemGroup> - <ItemGroup> - <Compile Include="Form1.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="Form1.Designer.cs"> - <DependentUpon>Form1.cs</DependentUpon> - </Compile> - <Compile Include="Program.cs" /> - <Compile Include="Properties\AssemblyInfo.cs" /> - <EmbeddedResource Include="Properties\Resources.resx"> - <Generator>ResXFileCodeGenerator</Generator> - <LastGenOutput>Resources.Designer.cs</LastGenOutput> - <SubType>Designer</SubType> - </EmbeddedResource> - <Compile Include="Properties\Resources.Designer.cs"> - <AutoGen>True</AutoGen> - <DependentUpon>Resources.resx</DependentUpon> - </Compile> - <None Include="Properties\Settings.settings"> - <Generator>SettingsSingleFileGenerator</Generator> - <LastGenOutput>Settings.Designer.cs</LastGenOutput> - </None> - <Compile Include="Properties\Settings.Designer.cs"> - <AutoGen>True</AutoGen> - <DependentUpon>Settings.settings</DependentUpon> - <DesignTimeSharedInput>True</DesignTimeSharedInput> - </Compile> - </ItemGroup> - <ItemGroup> - <None Include="App.config" /> - </ItemGroup> - <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> - <!-- To modify your build process, add your task inside one of the targets below and uncomment it. - Other similar extension points exist, see Microsoft.Common.targets. - <Target Name="BeforeBuild"> - </Target> - <Target Name="AfterBuild"> - </Target> - --> -</Project> \ No newline at end of file diff --git a/CK.SCP.UniApi_CQ/CktUniApiButton.Designer.cs b/CK.SCP.UniApi_CQ/CktUniApiButton.Designer.cs deleted file mode 100644 index 8f9d838..0000000 --- a/CK.SCP.UniApi_CQ/CktUniApiButton.Designer.cs +++ /dev/null @@ -1,162 +0,0 @@ -namespace CK.SCP.GrupUniApi -{ - partial class CktUniApiButton - { - /// <summary> - /// 必需的设计器变量。 - /// </summary> - private System.ComponentModel.IContainer components = null; - - /// <summary> - /// 清理所有正在使用的资源。 - /// </summary> - /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param> - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region 组件设计器生成的代码 - - /// <summary> - /// 设计器支持所需的方法 - 不要修改 - /// 使用代码编辑器修改此方法的内容。 - /// </summary> - private void InitializeComponent() - { - this.groupPanel = new DevComponents.DotNetBar.Controls.GroupPanel(); - this.ButtonManual = new DevComponents.DotNetBar.ButtonX(); - this.IntCounter = new DevComponents.Editors.IntegerInput(); - this.Switch = new DevComponents.DotNetBar.Controls.SwitchButton(); - this.groupPanel.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.IntCounter)).BeginInit(); - this.SuspendLayout(); - // - // groupPanel - // - this.groupPanel.CanvasColor = System.Drawing.SystemColors.Control; - this.groupPanel.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; - this.groupPanel.Controls.Add(this.ButtonManual); - this.groupPanel.Controls.Add(this.IntCounter); - this.groupPanel.Controls.Add(this.Switch); - this.groupPanel.DisabledBackColor = System.Drawing.Color.Empty; - this.groupPanel.Dock = System.Windows.Forms.DockStyle.Fill; - this.groupPanel.Location = new System.Drawing.Point(2, 2); - this.groupPanel.Margin = new System.Windows.Forms.Padding(2); - this.groupPanel.Name = "groupPanel"; - this.groupPanel.Padding = new System.Windows.Forms.Padding(2); - this.groupPanel.Size = new System.Drawing.Size(156, 46); - // - // - // - this.groupPanel.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.groupPanel.Style.BackColorGradientAngle = 90; - this.groupPanel.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.groupPanel.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.groupPanel.Style.BorderBottomWidth = 1; - this.groupPanel.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.groupPanel.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.groupPanel.Style.BorderLeftWidth = 1; - this.groupPanel.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.groupPanel.Style.BorderRightWidth = 1; - this.groupPanel.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.groupPanel.Style.BorderTopWidth = 1; - this.groupPanel.Style.CornerDiameter = 4; - this.groupPanel.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.groupPanel.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; - this.groupPanel.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; - this.groupPanel.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; - // - // - // - this.groupPanel.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.groupPanel.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.groupPanel.TabIndex = 18; - this.groupPanel.Text = "标题"; - // - // ButtonManual - // - this.ButtonManual.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.ButtonManual.ColorTable = DevComponents.DotNetBar.eButtonColor.BlueOrb; - this.ButtonManual.Dock = System.Windows.Forms.DockStyle.Fill; - this.ButtonManual.Location = new System.Drawing.Point(52, 2); - this.ButtonManual.Margin = new System.Windows.Forms.Padding(2); - this.ButtonManual.Name = "ButtonManual"; - this.ButtonManual.Size = new System.Drawing.Size(62, 18); - this.ButtonManual.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.ButtonManual.TabIndex = 4; - this.ButtonManual.Text = "手动执行"; - this.ButtonManual.Click += new System.EventHandler(this.ButtonManual_Click); - // - // IntCounter - // - // - // - // - this.IntCounter.BackgroundStyle.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(231)))), ((int)(((byte)(227)))), ((int)(((byte)(231))))); - this.IntCounter.BackgroundStyle.Class = "DateTimeInputBackground"; - this.IntCounter.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.IntCounter.ButtonFreeText.Shortcut = DevComponents.DotNetBar.eShortcut.F2; - this.IntCounter.Dock = System.Windows.Forms.DockStyle.Right; - this.IntCounter.IsInputReadOnly = true; - this.IntCounter.Location = new System.Drawing.Point(114, 2); - this.IntCounter.Margin = new System.Windows.Forms.Padding(2); - this.IntCounter.MinValue = 0; - this.IntCounter.Name = "IntCounter"; - this.IntCounter.Size = new System.Drawing.Size(34, 21); - this.IntCounter.TabIndex = 13; - // - // Switch - // - this.Switch.AnimationEnabled = false; - this.Switch.BackColor = System.Drawing.Color.Transparent; - // - // - // - this.Switch.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.Switch.Cursor = System.Windows.Forms.Cursors.Hand; - this.Switch.Dock = System.Windows.Forms.DockStyle.Left; - this.Switch.Location = new System.Drawing.Point(2, 2); - this.Switch.Margin = new System.Windows.Forms.Padding(2); - this.Switch.Name = "Switch"; - this.Switch.OffBackColor = System.Drawing.Color.DarkRed; - this.Switch.OffTextColor = System.Drawing.Color.White; - this.Switch.OnBackColor = System.Drawing.Color.Lime; - this.Switch.OnTextColor = System.Drawing.Color.Black; - this.Switch.ReadOnlyMarkerColor = System.Drawing.Color.Teal; - this.Switch.Size = new System.Drawing.Size(50, 18); - this.Switch.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.Switch.SwitchWidth = 20; - this.Switch.TabIndex = 11; - this.Switch.ValueChanged += new System.EventHandler(this.Switch_ValueChanged); - // - // CktUniApiButton - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.groupPanel); - this.Margin = new System.Windows.Forms.Padding(2); - this.Name = "CktUniApiButton"; - this.Padding = new System.Windows.Forms.Padding(2); - this.Size = new System.Drawing.Size(160, 50); - this.groupPanel.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.IntCounter)).EndInit(); - this.ResumeLayout(false); - - } - - #endregion - - private DevComponents.DotNetBar.Controls.GroupPanel groupPanel; - private DevComponents.DotNetBar.ButtonX ButtonManual; - private DevComponents.DotNetBar.Controls.SwitchButton Switch; - private DevComponents.Editors.IntegerInput IntCounter; - } -} diff --git a/CK.SCP.UniApi_CQ/CktUniApiButton.cs b/CK.SCP.UniApi_CQ/CktUniApiButton.cs deleted file mode 100644 index c251f34..0000000 --- a/CK.SCP.UniApi_CQ/CktUniApiButton.cs +++ /dev/null @@ -1,118 +0,0 @@ -using System; -using System.Windows.Forms; - -namespace CK.SCP.GrupUniApi -{ - public partial class CktUniApiButton : UserControl - { - public string Title - { - get{return groupPanel.Text;} - set{groupPanel.Text = value;} - } - - public bool SwitchEnabled - { - get { return Switch.Value; } - set { Switch.Value = value; } - } - - public int InitCount { get; set; } - - public int Count - { - get { return IntCounter.Value; } - set { IntCounter.Value = value; } - } - - public bool EnableManual - { - get { return ButtonManual.Enabled; } - set { ButtonManual.Enabled = value; } - } - - public CktUniApiButton() - { - InitializeComponent(); - } - - public delegate void ButtonClickHandler(object sender, EventArgs e); - public event ButtonClickHandler ButtonClick; - private void ButtonManual_Click(object sender, EventArgs e) - { - try - { - Console.WriteLine($@"手动执行:{Title}。"); - RunOnceExecuted(); - ButtonClick?.Invoke(sender, e); - } - catch - { - // ignored - } - } - public delegate void SwitchValueChangedHandler(object sender, EventArgs e); - public event SwitchValueChangedHandler SwitchValueChanged; - private void Switch_ValueChanged(object sender, EventArgs e) - { - try - { - SwitchValueChanged?.Invoke(sender, e); - } - catch - { - // ignored - } - } - - public delegate void RunOnceHandler(); - - public event RunOnceHandler RunOnceExecute; - - private void RunOnceExecuted() - { - try - { - RunOnceExecute?.Invoke(); - } - catch - { - // ignored - } - } - - - public void Start() - { - if (!SwitchEnabled) return; - Console.WriteLine($@"启动:{Title},执行周期:{Count}秒。"); - RunOnceExecuted(); - Count = InitCount; - } - - - public void Stop() - { - if (!SwitchEnabled) return; - Console.WriteLine($@"停止:{Title}。"); - } - - - - public void RunOnce() - { - if (!SwitchEnabled) return; - if (Count == 0) - { - RunOnceExecuted(); - Count = InitCount; - } - else - { - Count--; - } - - - } - } -} diff --git a/CK.SCP.UniApi_CQ/CktUniApiButton.resx b/CK.SCP.UniApi_CQ/CktUniApiButton.resx deleted file mode 100644 index 1af7de1..0000000 --- a/CK.SCP.UniApi_CQ/CktUniApiButton.resx +++ /dev/null @@ -1,120 +0,0 @@ -<?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> \ No newline at end of file diff --git a/CK.SCP.UniApi_CQ/ClassDiagram1.cd b/CK.SCP.UniApi_CQ/ClassDiagram1.cd deleted file mode 100644 index 7b89419..0000000 --- a/CK.SCP.UniApi_CQ/ClassDiagram1.cd +++ /dev/null @@ -1,2 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<ClassDiagram /> \ No newline at end of file diff --git a/CK.SCP.UniApi_CQ/Config/ApiType.cs b/CK.SCP.UniApi_CQ/Config/ApiType.cs deleted file mode 100644 index 3b1552d..0000000 --- a/CK.SCP.UniApi_CQ/Config/ApiType.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace CK.SCP.GrupUniApi.Config -{ - public enum ApiType - { - Odbc = 0, - QadCsv = 1, - } -} \ No newline at end of file diff --git a/CK.SCP.UniApi_CQ/Config/CommonConfig.cs b/CK.SCP.UniApi_CQ/Config/CommonConfig.cs deleted file mode 100644 index 4a4416a..0000000 --- a/CK.SCP.UniApi_CQ/Config/CommonConfig.cs +++ /dev/null @@ -1,11 +0,0 @@ - - -namespace CK.SCP.GrupUniApi.Config -{ - public class CommonConfig - { - public string WMS接口数据流水号格式 { get; set; } = "yyMMdd_HHmmssffff"; - public string QAD域 { get; set; } = "CAAIYJ"; - public string QAD地点 { get; set; } = "CAAIYJ"; - } -} \ No newline at end of file diff --git a/CK.SCP.UniApi_CQ/Config/DurationConfig.cs b/CK.SCP.UniApi_CQ/Config/DurationConfig.cs deleted file mode 100644 index 1ae049f..0000000 --- a/CK.SCP.UniApi_CQ/Config/DurationConfig.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace CK.SCP.GrupUniApi.Config -{ - public class DurationConfig - { - public int ERP接口发送 { get; set; } = 300; - public int ERP接口接收 { get; set; } = 300; - public int CsAntolinMES接口 { get; set; } = 217; - public int CsAntolinJIS搜索客户零件号变更 { get; set; } = 1; - public int CsAntolinJIS接收排序发货单 { get; set; } = 60; - public int CsAntolinVIN执行程序 { get; set; } = 60; - public int CqBmptMES接口 { get; set; } = 300; - public int CqBmptEdiPut接口 { get; set; } = 600; - public int CqBmptEdiGet接口 { get; set; } = 600; - } -} \ No newline at end of file diff --git a/CK.SCP.UniApi_CQ/Config/FtpConfig.cs b/CK.SCP.UniApi_CQ/Config/FtpConfig.cs deleted file mode 100644 index c676f77..0000000 --- a/CK.SCP.UniApi_CQ/Config/FtpConfig.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace CK.SCP.GrupUniApi.Config -{ - public class FtpConfig - { - public string ظĿ¼ { get; set; } = "c:\\"; - public string ؽĿ¼ { get; set; } = "FromErp"; - public string طĿ¼ { get; set; } = "ToErp"; - public string رĿ¼ { get; set; } = "Bak"; - - public bool ǷִFTP { get; set; } = true; - public string ַ { get; set; } = "127.0.0.1"; - public string ˿ { get; set; } = "21"; - public string û { get; set; } = "admin"; - public string { get; set; } = "5E0AFEB85CA001A3371A9F19E7EC4DFF"; - public string Զ̸Ŀ¼ { get; set; } = "/"; - public string ԶToErpĿ¼ { get; set; } = "in"; - public string ԶFromErpĿ¼ { get; set; } = "toWms"; - public string ԶBakĿ¼ { get; set; } = "bak"; - - - } -} \ No newline at end of file diff --git a/CK.SCP.UniApi_CQ/Config/UniApiConfig.cs b/CK.SCP.UniApi_CQ/Config/UniApiConfig.cs deleted file mode 100644 index 1b0f31a..0000000 --- a/CK.SCP.UniApi_CQ/Config/UniApiConfig.cs +++ /dev/null @@ -1,24 +0,0 @@ -namespace CK.SCP.GrupUniApi.Config -{ - public class UniApiConfig - { - - public bool Scm采购订单 { get; set; } = true; - public bool Scm发货单 { get; set; } = true; - public bool Scm条码明细 { get; set; } = true; - public bool Scm发票 { get; set; } = false; - - public bool Qad零件 { get; set; } = true; - public bool Qad供应商 { get; set; } = true; - public bool Qad供应商零件 { get; set; } = true; - public bool Qad采购订单 { get; set; } = false; - //public bool Qad收货单 { get; set; } = true; - - public bool Wms收货单 { get; set; } = true; - public bool Wms退货单 { get; set; } = true; - public bool Wms库存 { get; set; } = true; - public bool Wms到货单 { get; set; } = true; - - public bool Wms库存质量 { get; set; } = true; - } -} \ No newline at end of file diff --git a/CK.SCP.UniApi_CQ/Controller/OdbcApiQadController.cs b/CK.SCP.UniApi_CQ/Controller/OdbcApiQadController.cs deleted file mode 100644 index 9b5ac8c..0000000 --- a/CK.SCP.UniApi_CQ/Controller/OdbcApiQadController.cs +++ /dev/null @@ -1,445 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Data.Entity.Migrations; -using System.Linq; -using CK.SCP.Models; -using CK.SCP.Models.Enums; -using CK.SCP.Models.ScpEntity; -using CK.SCP.Models.UniApiEntity; -using CK.SCP.Utils; -using CK.SCP.Controller; -using System.Text; -using System.Data.Entity.Core; - -namespace CK.SCP.GrupUniApi.Controller -{ - public static class OdbcApiQadController - { - - public static void GetNewCtrlList() - { - UniApiEntities idb = EntitiesFactory.CreateUniApiInstance(); - idb.Database.CommandTimeout = 60 * 20; - var tableNameList = EnumHelper.EnumToList<QadTableName>(); - // var qadCtrlList = idb.xxqad_ctrl.Where(p => p.xxqad_domain == ScpCache.Config.QAD && p.xxqad_scm == "0").ToList(); - var qadCtrlList = idb.xxqad_ctrl.Where(p => p.xxqad_scm == "0" ).ToList(); - foreach (var qadCtrl in qadCtrlList) - { - if (tableNameList.All(p => p.Name != qadCtrl.xxqad_table)) continue; - try - { - ScpEntities wdb = EntitiesFactory.CreateScpInstance(); - QadTableName qadTableName; - Enum.TryParse(qadCtrl.xxqad_table, false, out qadTableName); - switch (qadTableName) - { - case QadTableName.xxqad_pt_mstr: // - if (GlobalVar.ApiConfig.Qad) - { - Console.WriteLine($" QAD ӿݣ{qadCtrl.xxqad_table}:{qadCtrl.xxqad_table_qty}"); - UpdateParts(idb, wdb, qadCtrl.xxqad_seq); - } - else - continue; - break; - case QadTableName.xxqad_vd_mstr: //Ӧ - if (GlobalVar.ApiConfig.QadӦ) - { - Console.WriteLine($" QAD ӿݣ{qadCtrl.xxqad_table}:{qadCtrl.xxqad_table_qty}"); - UpdateVender(idb, wdb, qadCtrl.xxqad_seq); - } - else - continue; - break; - - case QadTableName.xxqad_vp_mstr: //Ӧ - if (GlobalVar.ApiConfig.QadӦ) - { - Console.WriteLine($" QAD ӿݣ{qadCtrl.xxqad_table}:{qadCtrl.xxqad_table_qty}"); - UpdateVendParts(idb, wdb, qadCtrl.xxqad_seq); - } - else - continue; - break; - case QadTableName.xxqad_pod_det: //ɹ - if (GlobalVar.ApiConfig.Qadɹ) - { - Console.WriteLine($" QAD ӿݣ{qadCtrl.xxqad_table}:{qadCtrl.xxqad_table_qty}"); - UpdatePurchaseOrders(idb, wdb, qadCtrl.xxqad_seq); - } - else - continue; - break; - case QadTableName.xxqad_pprice_det: //ɹ۸ - - Console.WriteLine($" QAD ӿݣ{qadCtrl.xxqad_table}:{qadCtrl.xxqad_table_qty}"); - UpdatePrice(idb, wdb, qadCtrl.xxqad_seq); - - break; - } - qadCtrl.xxqad_scm = ((int)UniApiState.ɹ).ToString(); - EntitiesFactory.SaveDb(wdb); - } - catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//ʵ֤쳣 - { - var sb = new StringBuilder(); - - foreach (var error in dbEx.EntityValidationErrors.ToList()) - { - - error.ValidationErrors.ToList().ForEach(i => - { - sb.AppendFormat("{0}ֶΣ{1}Ϣ{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); - }); - } - qadCtrl.xxqad_scm = ((int)UniApiState.ʧ).ToString(); - qadCtrl.xxqad_rmks += " SCM:" + sb.ToString(); - - } - catch (OptimisticConcurrencyException ex)//ͻ쳣 - { - qadCtrl.xxqad_scm = ((int)UniApiState.ʧ).ToString(); - qadCtrl.xxqad_rmks += " SCM:" + ex.Message; - - } - catch (Exception ex) - { - qadCtrl.xxqad_scm = ((int)UniApiState.ʧ).ToString(); - qadCtrl.xxqad_rmks += " SCM:" + ex.Message; - - } - finally - { - EntitiesFactory.SaveDb(idb); - } - } - - - - } - - - - /// <summary> - /// ²ɹ - /// </summary> - /// <param name="idb"></param> - /// <param name="wdb"></param> - /// <param name="seq"></param> - private static void UpdatePurchaseOrders(UniApiEntities idb, ScpEntities wdb, string seq) - { - // var qadPoDetailList = idb.xxqad_pod_det.Where(p => p.xxqad_pod_seq == seq).ToList(); ԭ xxqad_pod_modtype 1Ϊ󶩵 - var qadPoDetailList = idb.xxqad_pod_det.Where(p => p.xxqad_pod_seq == seq && p.xxqad_pod_scmread == "0").ToList(); - - var wmsPoList = new List<TB_PO>(); - var wmsPoDetailList = new List<TB_PO_DETAIL>(); - - var qadPoNbrList = qadPoDetailList.Select(p => p.xxqad_pod_nbr.ToUpper()).DistinctBy(p => p); - - foreach (var qadPoNbr in qadPoNbrList) - { - var qadDataList = qadPoDetailList.Where(p => p.xxqad_pod_nbr == qadPoNbr).ToList(); - if (qadDataList.Count == 0) - { - continue; - } - var firstqadData = qadDataList[0]; - //var wmsPo = wdb.TF_PO.SingleOrDefault(p => p.ErpBillNum == qadPoNbr); - var wmsPo = wdb.TB_PO.SingleOrDefault(p => p.ErpBillNum == qadPoNbr); - if (wmsPo == null) - { - - - int temp; - string strPoBillNum = SCP_BILLCODE_CONTROLLER.MakePOCode(); - wmsPo = new TB_PO - { - PoBillNum = qadPoNbr,// - ErpBillNum = qadPoNbr,//ERP - VendId = firstqadData.xxqad_pod_vend,//Ӧ̱ - ModType = Int32.TryParse(firstqadData.xxqad_pod_modtype, out temp) ? temp : (int?)null, //(1:ճ̵,2:ɢ) - Contacter = firstqadData.xxqad_pod_attn,//ϵ - Site = firstqadData.xxqad_pod_domain,//ص - - - //Buyer = firstqadData.xxqad_pod_buyer,//ɹԱ - //BuyerPhone = firstqadData.xxqad_pod_buyer_phone,//ɹԱ绰 - State = (int)FormState.,//״̬ - Remark = firstqadData.xxqad_pod_site,//˵ - CreateTime = firstqadData.xxqad_pod_createdt == null ? DateTime.Now : (DateTime)firstqadData.xxqad_pod_createdt,// - CreateUser = firstqadData.xxqad_pod_createur,//û - //UpdateTime = firstqadData.xxqad_pod_updatedt,// - //UpdateUser = firstqadData.xxqad_pod_updateur,//û - IsDeleted = false, - GUID = System.Guid.NewGuid(), - BeginTime = firstqadData.xxqad_pod_createdt,// - EndTime = firstqadData.xxqad_pod_due_date//ջʱ - }; - wmsPoList.Add(wmsPo); - } - - wmsPo.Contacter = firstqadData.xxqad_pod_attn; - wmsPo.Buyer = firstqadData.xxqad_pod_buyer; - wmsPo.BuyerPhone = firstqadData.xxqad_pod_buyer_phone; - - wmsPo.UpdateTime = firstqadData.xxqad_pod_updatedt;// - wmsPo.UpdateUser = firstqadData.xxqad_pod_updateur;//û - - foreach (var qadData in qadDataList) - { - try - { - var lineNum = Convert.ToInt32(qadData.xxqad_pod_line); - //var wmsPoDetail = - // wdb.TF_PO_DETAIL.SingleOrDefault( - // p => p.ErpBillNum == qadPoNbr && p.LineNum == lineNum); - var wmsPoDetail = - wdb.TB_PO_DETAIL.SingleOrDefault( - p => p.PoBillNum == qadPoNbr && p.PoLine == lineNum); - if (wmsPoDetail == null) - { - wmsPoDetail = new TB_PO_DETAIL - { - PoBillNum = qadPoNbr,// - PoLine = lineNum,// - IsDeleted = false, - GUID = System.Guid.NewGuid() - }; - wmsPoDetailList.Add(wmsPoDetail); - } - - wmsPoDetail.PartCode = qadData.xxqad_pod_part.ToUpper();//-Ϻ - wmsPoDetail.PlanQty = qadData.xxqad_pod_qty_ord;//-ɹ - //wmsPoDetail.ShippedQty = qadData.xxqad_pod_qty_rct;//ѷ-ջ - //wmsPoDetail.ReceivedQty = qadData.xxqad_pod_qty_rct;//-ջ - //wmsPoDetail.RejectQty = qadData.xxqad_pod_qty_rct;//-ջ - wmsPoDetail.BeginTime = firstqadData.xxqad_pod_createdt;//ջʼʱ - wmsPoDetail.EndTime = qadData.xxqad_pod_due_date;//ջʱ - wmsPoDetail.PoUnit = qadData.xxqad_pod_um;//ɹλ - wmsPoDetail.LocUnit = qadData.xxqad_pod_loc_um.ToUpper();//洢λ - wmsPoDetail.DockCode = qadData.xxqad_pod_loc; - wmsPoDetail.Price = ScpCache.Config.Ŀ == ProjectName.챱ģ.ToString() - ? 0 - : qadData.xxqad_pod_price; - wmsPoDetail.Currency = qadData.xxqad_pod_curr;// - wmsPoDetail.PackQty = qadData.xxqad_pod_qty_std;// - wmsPoDetail.UnConv = qadData.xxqad_pod_um_conv;//ת - - wmsPoDetail.DockCode = qadData.xxqad_pod_loc; - //wmsPoDetail.DockCode = ?;// - wmsPoDetail.State = Convert.ToInt32(qadData.xxqad_pod_status);//״̬ - wmsPoDetail.Remark = qadData.xxqad_pod_domain;//ע - wmsPoDetail.CreateTime = firstqadData.xxqad_pod_createdt == null ? DateTime.Now : (DateTime)firstqadData.xxqad_pod_createdt;// - wmsPoDetail.CreateUser = firstqadData.xxqad_pod_createur;//û - wmsPoDetail.UpdateTime = firstqadData.xxqad_pod_updatedt;// - wmsPoDetail.UpdateUser = firstqadData.xxqad_pod_updateur;//û - - //if (wmsPoDetail.BillQty != 0 && wmsPoDetail.BillQty <= wmsPoDetail.ReceivedQty) - // wmsPoDetail.State = (int)FormState.ر; - - if (wmsPoDetail.PlanQty != 0 && wmsPoDetail.PlanQty <= wmsPoDetail.ReceivedQty) - wmsPoDetail.State = (int)FormState.ر; - - qadData.xxqad_pod_scmread = ((int)UniApiState.ɹ).ToString(); - } - catch (Exception ex) - { - qadData.xxqad_pod_scmread = ((int)UniApiState.ʧ).ToString(); - qadData.xxqad_pod_rmks += " SCM:" + ex.Message; - } - qadData.xxqad_pod_updateur = ScpCache.Config.SCPû; - qadData.xxqad_pod_updatedt = DateTime.Now; - - } - wmsPo.State = qadDataList.All(p => p.xxqad_pod_status == ((int)FormState.ر).ToString()) - ? (int)FormState.ر - : (int)FormState.; - } - wdb.TB_PO.AddOrUpdate(wmsPoList.ToArray()); - wdb.TB_PO_DETAIL.AddOrUpdate(wmsPoDetailList.ToArray()); - Console.WriteLine($" ɹ ݣ{qadPoDetailList.Count}"); - } - /// <summary> - /// ²ɹ - /// </summary> - /// <param name="idb"></param> - /// <param name="wdb"></param> - /// <param name="seq"></param> - private static void UpdatePrice(UniApiEntities idb, ScpEntities scpdb, string seq) - { - var _list = idb.xxqad_pprice_det.Where(p => p.xxqad_pprice_seq == seq && p.xxqad_pprice_scmread == "0").ToList(); - var PriceList = new List<TB_PRICE>(); - foreach (var itm in _list) - { - var _price= new TB_PRICE - { - VendId = itm.xxqad_pprice_list, - Unit = itm.xxqad_pprice_um, - PartCode = itm.xxqad_pprice_part, - Site = itm.xxqad_pprice_domain, - Remarks = itm.xxqad_pprice_rmks, - StartTime = itm.xxqad_pprice_start, - EndTime = itm.xxqad_pprice_end, - Curr = itm.xxqad_pprice_curr - }; - _price.Amt = itm.xxqad_pprice_amt; - PriceList.Add(_price); - } - scpdb.TB_PRICE.AddOrUpdate(PriceList.ToArray()); - Console.WriteLine($"²ɹ۸ݣ{PriceList.Count}"); - } - /// <summary> - /// ¹Ӧ - /// </summary> - /// <param name="idb"></param> - /// <param name="wdb"></param> - /// <param name="seq"></param> - private static void UpdateVendParts(UniApiEntities idb, ScpEntities wdb, string seq) - { - var qadDataList = idb.xxqad_vp_mstr.Where(p => p.xxqad_vp_seq == seq ).ToList(); - var wmsDataList = new List<TA_VEND_PART>(); - foreach (var qadData in qadDataList) - { - try - { - if (string.IsNullOrEmpty(qadData.xxqad_vp_vend_part)) - qadData.xxqad_vp_vend_part = qadData.xxqad_vp_part; - var wmsData = - wdb.TA_VEND_PART.SingleOrDefault( - p => p.VendId == qadData.xxqad_vp_addr.ToUpper() - && p.PartCode == qadData.xxqad_vp_part.ToUpper() - && p.VendPartCode == qadData.xxqad_vp_vend_part.ToUpper() && p.Site==qadData.xxqad_vp_domain - ) ?? - new TA_VEND_PART - { - VendId = qadData.xxqad_vp_addr.ToUpper(),//Ӧ̱ - PartCode = qadData.xxqad_vp_part.ToUpper(),//ӦϺ - VendPartCode = qadData.xxqad_vp_vend_part.ToUpper(),//ӦϺ - VendPackQty = qadData.xxqad_vp_comment,//ӦϺ - //PoUnit = qadData.,//ɹλ - State = 1,//״̬0ʧЧ 1:Ч - Remark = "", - CreateTime = qadData.xxqad_vp_createdt == null ? DateTime.Now : (DateTime)qadData.xxqad_vp_createdt,// - CreateUser = qadData.xxqad_vp_createur,//û - UpdateTime = qadData.xxqad_vp_updatedt,// - UpdateUser = qadData.xxqad_vp_updateur,//û - TransportationTime=qadData.xxqad_vp_vend_lead, - IsDeleted = false, - GUID = new Guid() - }; - wmsData.Site = string.IsNullOrEmpty(wmsData.Site) ? qadData.xxqad_vp_domain : wmsData.Site; - wmsData.VendPartCode = qadData.xxqad_vp_vend_part?.ToUpper() ?? qadData.xxqad_vp_part.ToUpper(); - wmsData.VendPackQty = qadData.xxqad_vp_comment; - wmsData.TransportationTime = qadData.xxqad_vp_vend_lead; - wmsDataList.Add(wmsData); - qadData.xxqad_vp_scmread = ((int)UniApiState.ɹ).ToString(); - } - catch (Exception ex) - { - qadData.xxqad_vp_scmread = ((int)UniApiState.ʧ).ToString(); - qadData.xxqad_vp_rmks += " SCM:" + ex.Message; - } - qadData.xxqad_vp_updateur = ScpCache.Config.SCPû; - qadData.xxqad_vp_updatedt = DateTime.Now; - - } - wdb.TA_VEND_PART.AddOrUpdate(p=>new { p.PartCode,p.VendId, p.Site }, wmsDataList.ToArray()); - Console.WriteLine($" Ӧ ݣ{wmsDataList.Count}"); - } - - /// <summary> - /// ¹Ӧ - /// </summary> - /// <param name="idb"></param> - /// <param name="wdb"></param> - /// <param name="seq"></param> - private static void UpdateVender(UniApiEntities idb, ScpEntities wdb, string seq) - { - var qadDataList = idb.xxqad_vd_mstr.Where(p => p.xxqad_vd_seq == seq ).ToList(); - var wmsDataList = new List<TA_VENDER>(); - - foreach (var qadData in qadDataList) - { - try - { - var wmsData = wdb.TA_VENDER.SingleOrDefault(p => p.VendId == qadData.xxqad_vd_addr.ToUpper() && p.Site==qadData.xxqad_vd_domain) ?? - new TA_VENDER { VendId = qadData.xxqad_vd_addr.ToUpper(), VendAbbCode = "0", State = 1 }; - wmsData.VendName = string.IsNullOrEmpty(qadData.xxqad_vd_name)?qadData.xxqad_vd_addr:qadData.xxqad_vd_name; - wmsData.VendType = qadData.xxqad_vd_type.ToUpper().ToString(); - wmsData.Country = qadData.xxqad_vd_country; - wmsData.City = qadData.xxqad_vd_city; - wmsData.Currency = qadData.xxqad_vd_curr.ToUpper(); - wmsData.Address = qadData.xxqad_vd_line1 + qadData.xxqad_vd_line2 + qadData.xxqad_vd_line3; - wmsData.ZipCode = qadData.xxqad_vd_pst_id; - wmsData.Contacter = qadData.xxqad_vd_attn; - wmsData.Phone = qadData.xxqad_vd_phone; - wmsData.Fax = qadData.xxqad_vd_fax; - wmsData.Site = string.IsNullOrEmpty(wmsData.Site)? qadData.xxqad_vd_domain:wmsData.Site; - wmsData.Tax = qadData.xxqad_vd_tax;//˰ - wmsDataList.Add(wmsData); - qadData.xxqad_vd_scmread = ((int)UniApiState.ɹ).ToString(); - - } - catch (Exception ex) - { - qadData.xxqad_vd_scmread = ((int)UniApiState.ʧ).ToString(); - qadData.xxqad_vd_rmks += " SCM:" + ex.Message; - } - qadData.xxqad_vd_updateur = ScpCache.Config.SCPû; - qadData.xxqad_vd_updatedt = DateTime.Now; - } - if (wmsDataList.Count == 0) - { - Console.WriteLine(" Ӧ :"+ seq+""); - return; - } - - wdb.TA_VENDER.AddOrUpdate(p=>new {p.VendId,p.Site } ,wmsDataList.ToArray()); - Console.WriteLine($" Ӧ ݣ{qadDataList.Count}"); - } - - /// <summary> - /// - /// </summary> - /// <param name="idb"></param> - /// <param name="wdb"></param> - /// <param name="seq"></param> - private static void UpdateParts(UniApiEntities idb, ScpEntities wdb, string seq) - { - var qadDataList = idb.xxqad_pt_mstr.Where(p => p.xxqad_pt_seq == seq ).ToList(); - var wmsDataList = new List<TA_PART>(); - foreach (var qadData in qadDataList) - { - try - { - var wmsData = wdb.TA_PART.SingleOrDefault(p => p.ErpPartCode == qadData.xxqad_pt_part.ToUpper() && p.Site==qadData.xxqad_pt_domain) ?? - new TA_PART - { - PartCode = qadData.xxqad_pt_part.ToUpper(), - ErpPartCode = qadData.xxqad_pt_part.ToUpper(), - }; - wmsData.PartDesc1 = qadData.xxqad_pt_desc1; - wmsData.PartDesc2 = qadData.xxqad_pt_desc2; - wmsData.ProjectId = qadData.xxqad_pt_group.ToUpper(); - wmsData.Unit = !string.IsNullOrEmpty(qadData.xxqad_pt_um)? qadData.xxqad_pt_um.ToUpper():"EA"; - wmsData.PartGroup = qadData.xxqad_pt_dsgn_grp.ToUpper(); - wmsData.State = qadData.xxqad_pt_status.ToUpper(); - wmsData.Site = qadData.xxqad_pt_domain; - - wmsDataList.Add(wmsData); - qadData.xxqad_pt_scmread = ((int)UniApiState.ɹ).ToString(); - } - catch (Exception ex) - { - qadData.xxqad_pt_scmread = ((int)UniApiState.ʧ).ToString(); - qadData.xxqad_pt_rmks += " SCM:" + ex.Message; - } - qadData.xxqad_pt_updateur = ScpCache.Config.SCPû; - qadData.xxqad_pt_updatedt = DateTime.Now; - } - wdb.TA_PART.AddOrUpdate(p =>new { p.PartCode, p.Site }, wmsDataList.ToArray()); - Console.WriteLine($" Ϣ ݣ{qadDataList.Count}"); - } - - } -} diff --git a/CK.SCP.UniApi_CQ/Controller/OdbcApiScpController.cs b/CK.SCP.UniApi_CQ/Controller/OdbcApiScpController.cs deleted file mode 100644 index 0dc79a5..0000000 --- a/CK.SCP.UniApi_CQ/Controller/OdbcApiScpController.cs +++ /dev/null @@ -1,331 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using CK.SCP.Models; -using CK.SCP.Models.Enums; -using CK.SCP.Models.ScpEntity; -using CK.SCP.Models.UniApiEntity; - -//using xxscm_tx_mstr = ChangKeTec.Wms.Models.UniApi.xxscm_tx_mstr; -//using xxscm_ctrl = ChangKeTec.Wms.Models.UniApi.xxscm_ctrl; -//using xxscm_inv_det = ChangKeTec.Wms.Models.UniApi.xxscm_inv_det; -//using xxscm_ld_det = ChangKeTec.Wms.Models.UniApi.xxscm_ld_det; -//using xxscm_tx_det = ChangKeTec.Wms.Models.UniApi.xxscm_tx_det; -//using xxscm_pod_det = ChangKeTec.Wms.Models.UniApi.xxscm_pod_det; -//using xxscm_rt_det = ChangKeTec.Wms.Models.UniApi.xxscm_rt_det; -//using xxscm_soiss_det = ChangKeTec.Wms.Models.UniApi.xxscm_soiss_det; -//using xxscm_tag_det = ChangKeTec.Wms.Models.UniApi.xxscm_tag_det; -//using xxscm_tr_det = ChangKeTec.Wms.Models.UniApi.xxscm_tr_det; - -namespace CK.SCP.GrupUniApi.Controller -{ - public static class OdbcApiScpController - { - - private static string CreateSeq(string pre) - { - return pre + "_" + DateTime.Now.ToString(ScpCache.Config.SCP接口数据流水号格式); - } - - private static void PutScpCtrl(UniApiEntities idb, string seq, string tableName, int rowCount,string p_domain,string p_site) - { - - var wmsCtrl = new xxscm_ctrl - { - xxscm_seq = seq, - xxscm_table = tableName, - xxscm_table_qty = rowCount, - xxscm_qad = ((int)UniApiState.待执行).ToString(), - xxscm_mes = ((int)UniApiState.待执行).ToString(), - xxscm_scm = ((int)UniApiState.待执行).ToString(), - xxscm_wms = ((int)UniApiState.待执行).ToString(), - xxscm_rmks = "", - xxscm_domain =p_domain, - xxscm_site = p_site, - //xxscm_create_time = DateTime.Now, - }; - idb.xxscm_ctrl.Add(wmsCtrl); - } - - public static void PutAll(ScpEntities sdb, UniApiEntities idb, List<TS_UNI_API> dataList) - { - var billNumList = dataList.Select(p => p.BillNum).Distinct(); - - foreach (string billNum in billNumList) - { - var list = dataList.Where(p => p.BillNum == billNum).ToList(); - //if (GlobalVar.ApiConfig.Scm采购订单) - // PutScmPo(idb, - // list.Where(p => p.InterfaceType == UniApiType.PO.ToString()).ToList()); - if (GlobalVar.ApiConfig.Scm发货单) - PutScmAsn(idb, list.Where(p => p.InterfaceType == UniApiType.Receive.ToString()).ToList()); - if (GlobalVar.ApiConfig.Scm条码明细) - PutScmBarcode(idb, list.Where(p => p.InterfaceType == UniApiType.BarCode.ToString()).ToList()); - if (GlobalVar.ApiConfig.Scm发票) - PutScmInvoice(idb, list.Where(p => p.InterfaceType == UniApiType.Invoice.ToString()).ToList()); - Thread.Sleep(10); - } - } - - - /// <summary> - /// 发货单 - /// </summary> - /// <param name="idb"></param> - /// <param name="dataList"></param> - private static void PutScmAsn(UniApiEntities idb, List<TS_UNI_API> dataList) - { - var uni_api = dataList.FirstOrDefault(); - string seq = string.Empty; - if (dataList.Count > 0) - { - seq = CreateSeq(uni_api.Site); - } - - var tableName = ScmTableName.xxscm_tx_mstr.ToString(); - var qadDataList = new List<xxscm_tx_mstr>(); - foreach (var wmsData in dataList) - { - var qadData = qadDataList.SingleOrDefault(p => p.xxscm_tx_nbr == wmsData.BillNum - && p.xxscm_tx_domain == wmsData.Site - && p.xxscm_tx_part == wmsData.PartCode); - if (qadData == null) - { - qadData = new xxscm_tx_mstr - { - xxscm_tx_seq = seq, - xxscm_tx_nbr = wmsData.BillNum, - xxscm_tx_site =wmsData.Site, - xxscm_tx_part = wmsData.PartCode, - xxscm_tx_qadread = ((int)UniApiState.待执行).ToString(), - xxscm_tx_wmsread = ((int)UniApiState.待执行).ToString(), - xxscm_tx_scmread = ((int)UniApiState.待执行).ToString(), - xxscm_tx_mesread = ((int)UniApiState.待执行).ToString(), - xxscm_tx_createur = wmsData.CreateOper, - xxscm_tx_createdt = wmsData.CreateTime, - xxscm_tx_updateur = "", - xxscm_tx_updatedt = DateTime.Now, - xxscm_tx_rmks = "", - xxscm_tx_domain = wmsData.Domain, - xxscm_tx_po_nbr = wmsData.ErpBillNum, - xxscm_tx_po_line = wmsData.ErpLineNum.ToString(), - xxscm_tx_conv = wmsData.UmConv, - xxscm_tx_date_Promise = wmsData.ValidDate, - xxscm_tx_date_due = wmsData.ValidDate, - xxscm_tx_date_ship = wmsData.CreateTime, - xxscm_tx_loc_um = wmsData.LocUnit == null ? "" : wmsData.LocUnit, - xxscm_tx_po_um = wmsData.PoUnit == null ? "" : wmsData.PoUnit, - xxscm_tx_pprice = wmsData.Price, - xxscm_tx_qty_std = wmsData.PackQty, - xxscm_tx_qty_total = wmsData.Qty, - xxscm_tx_status = ((int)FormState.开放).ToString(), - xxscm_tx_type = "", - xxscm_tx_vend = wmsData.VendId, - xxscm_tx_vend_batch = wmsData.VendBatch, - xxscm_tx_ware = "", - xxscm_tx_ware_class = "", - }; - //PutScpCtrl(idb, qadData.xxscm_tx_seq, tableName,1,wmsData.Domain,wmsData.Site ); - qadDataList.Add(qadData); - } - wmsData.State = (int)BillState.Finish; - wmsData.PutTime = DateTime.Now; - } - if (qadDataList.Count == 0) return; - idb.xxscm_tx_mstr.AddRange(qadDataList); - Console.WriteLine($"新增 发货单 数据:{qadDataList.Count} 条"); - PutScpCtrl(idb, seq, tableName, qadDataList.Count,uni_api.Domain,uni_api.Site); - } - - /// <summary> - /// 采购订单 - /// </summary> - /// <param name = "idb" ></ param > - /// < param name="dataList"></param> - //private static void PutScmPo(UniApiEntities idb, List<TS_UNI_API> dataList) - //{ - - // var seq = CreateSeq("PO"); - - // var tableName = ScmTableName.xxscm_pod_det.ToString(); - // var qadDataList = new List<xxscm_pod_det>(); - // foreach (var wmsData in dataList) - // { - - - // var qadData = qadDataList.SingleOrDefault(p => p.xxscm_pod_nbr == wmsData.ErpBillNum - // && p.xxscm_pod_line == wmsData.ErpLineNum - // && p.xxscm_pod_site == ScpCache.Config.QAD地点 - // && p.xxscm_pod_part == wmsData.PartCode); - // if (qadData == null) - // { - // if (wmsData.PartCode != null) - // qadData = new xxscm_pod_det - // { - // xxscm_pod_seq = seq, - // xxscm_pod_nbr = wmsData.ErpBillNum, - // xxscm_pod_part = wmsData.PartCode, - - // xxscm_pod_site = ScpCache.Config.QAD地点, - // xxscm_pod_vend = wmsData.VendId, - // xxscm_pod_loc_um = wmsData.LocUnit, - // xxscm_pod_qadread = ((int)UniApiState.待执行).ToString(), - // xxscm_pod_wmsread = ((int)UniApiState.待执行).ToString(), - // xxscm_pod_scmread = ((int)UniApiState.待执行).ToString(), - // xxscm_pod_mesread = ((int)UniApiState.待执行).ToString(), - // xxscm_pod_createur = wmsData.CreateOper, - // xxscm_pod_createdt = wmsData.CreateTime, - // xxscm_pod_updateur = "", - // xxscm_pod_updatedt = DateTime.Now, - // xxscm_pod_rmks = "", - // xxscm_pod_domain = ScpCache.Config.QAD域, - // xxscm_pod_attn = wmsData.Attn, - // xxscm_pod_buyer = wmsData.Buyer, - // xxscm_pod_buyer_phone = wmsData.BuyerPhone, - // xxscm_pod_confirm = false, - // xxscm_pod_curr = wmsData.Currency, - // xxscm_pod_desc = ScpCache.GetPartDesc(wmsData.PartCode), - // xxscm_pod_due_date = wmsData.ValidDate, - // xxscm_pod_line = wmsData.ErpLineNum, - // xxscm_pod_made = "", - // xxscm_pod_modtype = wmsData.ModType, - // xxscm_pod_name = "", - // xxscm_pod_price = wmsData.Price, - // xxscm_pod_qty_ord = wmsData.PackQty, - // xxscm_pod_qty_std = wmsData.Qty, - // xxscm_pod_qty_rct = 0, - // xxscm_pod_ship = wmsData.SourceBillNum, - // xxscm_pod_status = wmsData.State.ToString(), - // xxscm_pod_um = wmsData.PoUnit, - // xxscm_pod_um_conv = wmsData.UmConv, - // }; - // qadDataList.Add(qadData); - // } - - - // wmsData.State = (int)BillState.Finish; - // wmsData.PutTime = DateTime.Now; - // } - // if (qadDataList.Count == 0) return; - - // idb.xxscm_pod_det.AddRange(qadDataList); - // Console.WriteLine($"新增 采购订单 数据:{qadDataList.Count} 条"); - - // PutScpCtrl(idb, seq, tableName, qadDataList.Count); - - //} - - /// <summary> - /// 条码 - /// </summary> - /// <param name="idb"></param> - /// <param name="dataList"></param> - private static void PutScmBarcode(UniApiEntities idb, List<TS_UNI_API> dataList) - { - var tableName = ScmTableName.xxscm_tx_det.ToString(); - var qadDataList = new List<xxscm_tx_det>(); - foreach (var wmsData in dataList) - { - var qadData = qadDataList.SingleOrDefault(p => p.xxscm_tx_nbr == wmsData.BillNum - && p.xxscm_tx_boxcode == wmsData.Barcode); - if (qadData == null) - { - qadData = new xxscm_tx_det - { - xxscm_tx_seq = CreateSeq(wmsData.Domain), - xxscm_tx_nbr = wmsData.BillNum, - xxscm_tx_part = wmsData.PartCode, - xxscm_tx_qadread = ((int)UniApiState.待执行).ToString(), - xxscm_tx_wmsread = ((int)UniApiState.待执行).ToString(), - xxscm_tx_scmread = ((int)UniApiState.待执行).ToString(), - xxscm_tx_mesread = ((int)UniApiState.待执行).ToString(), - xxscm_tx_createur = wmsData.CreateOper, - xxscm_tx_createdt = wmsData.CreateTime, - xxscm_tx_updateur = "", - xxscm_tx_updatedt = DateTime.Now, - xxscm_tx_rmks = "", - xxscm_tx_domain = wmsData.Domain, - xxscm_tx_vend = wmsData.VendId, - xxscm_tx_batch = wmsData.VendBatch, - xxscm_tx_boxcode = wmsData.Barcode, - xxscm_tx_qty_real = wmsData.Qty, - }; - qadDataList.Add(qadData); - } - wmsData.State = (int)BillState.Finish; - wmsData.PutTime = DateTime.Now; - } - if (qadDataList.Count == 0) return; - idb.xxscm_tx_det.AddRange(qadDataList); - Console.WriteLine($"新增 条码 数据:{qadDataList.Count} 条"); - - } - - /// <summary> - /// 发票 - /// </summary> - /// <param name="idb"></param> - /// <param name="dataList"></param> - private static void PutScmInvoice(UniApiEntities idb, List<TS_UNI_API> dataList) - { - var seq = CreateSeq("IV"); - var tableName = ScmTableName.xxscm_inv_det.ToString(); - var qadDataList = new List<xxscm_inv_det>(); - foreach (var wmsData in dataList) - { - var qadData = qadDataList.SingleOrDefault(p => p.xxscm_inv_nbr == wmsData.BillNum - && p.xxscm_inv_site == wmsData.Domain - && p.xxscm_inv_part == wmsData.PartCode - && p.xxscm_inv_line == wmsData.ErpLineNum.ToString()); - if (qadData == null) - { - qadData = new xxscm_inv_det - { - xxscm_inv_seq = seq, - xxscm_inv_nbr = wmsData.BillNum, - xxscm_inv_site = wmsData.Site, - xxscm_inv_part = wmsData.PartCode, - xxscm_inv_qty = wmsData.Qty, - xxscm_inv_date = wmsData.ValidDate, - xxscm_inv_qadread = ((int)UniApiState.待执行).ToString(), - xxscm_inv_wmsread = ((int)UniApiState.待执行).ToString(), - xxscm_inv_scmread = ((int)UniApiState.待执行).ToString(), - xxscm_inv_mesread = ((int)UniApiState.待执行).ToString(), - xxscm_inv_createur = wmsData.CreateOper, - xxscm_inv_createdt = wmsData.CreateTime, - xxscm_inv_updateur = "", - xxscm_inv_updatedt = DateTime.Now, - xxscm_inv_rmks = "", - xxscm_inv_domain = wmsData.Domain, - xxscm_inv_amt = wmsData.Price, - xxscm_inv_asn = wmsData.SourceBillNum, - xxscm_inv_curr = wmsData.Currency, - xxscm_inv_vend = wmsData.VendId, - xxscm_inv_line = wmsData.ErpLineNum.ToString(), - xxscm_inv_invoice = wmsData.Invoice, - xxscm_inv_order = wmsData.ErpBillNum, - xxscm_inv_price = wmsData.Price, - xxscm_inv_taxamt = wmsData.TaxAmt, - xxscm_inv_receiver = wmsData.Receiver, - xxscm_inv_taxt = wmsData.Tax, - xxscm_inv_comments = "", - xxscm_inv_holdamt = 0, - xxscm_inv_acctuser = "", - }; - qadDataList.Add(qadData); - } - wmsData.State = (int)BillState.Finish; - wmsData.PutTime = DateTime.Now; - } - if (qadDataList.Count == 0) return; - - idb.xxscm_inv_det.AddRange(qadDataList); - Console.WriteLine($"新增 发票 数据:{qadDataList.Count} 条"); - - // PutScpCtrl(idb, seq, tableName, qadDataList.Count); - - } - - } -} \ No newline at end of file diff --git a/CK.SCP.UniApi_CQ/Controller/OdbcApiWmsController.cs b/CK.SCP.UniApi_CQ/Controller/OdbcApiWmsController.cs deleted file mode 100644 index d386e84..0000000 --- a/CK.SCP.UniApi_CQ/Controller/OdbcApiWmsController.cs +++ /dev/null @@ -1,802 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Data.Entity.Migrations; -using System.Linq; -using CK.SCP.Models; -using CK.SCP.Models.Enums; -using CK.SCP.Models.ScpEntity; -using CK.SCP.Models.UniApiEntity; -using CK.SCP.Utils; -using System.Text; -using System.Data.Entity.Core; - -namespace CK.SCP.GrupUniApi.Controller -{ - public static class OdbcApiWmsController - { - public static void GetNewCtrlList() - { - - UniApiEntities idb = EntitiesFactory.CreateUniApiInstance(); - idb.Database.CommandTimeout = 60 * 20; - var tableNameList = EnumHelper.EnumToList<WmsTableName>(); - var wmsCtrlList = idb.xxwms_ctrl.Where(p => p.xxwms_scm == "0").ToList(); - // var wmsCtrlList = idb.xxwms_ctrl.Where(p => p.xxwms_wms == "0").ToList(); - - //ɾscpԭϿ - if (GlobalVar.ApiConfig.Wms) - { - ScpEntities wdb = EntitiesFactory.CreateScpInstance(); - - var kucunlist = wmsCtrlList.Where(p => p.xxwms_table == "xxwms_ld_det").ToList(); - - //п - if (kucunlist.Count > 0) - { - var _stockList = wdb.TS_STOCK.ToList(); - - wdb.TS_STOCK.RemoveRange(_stockList); - - //EntitiesFactory.SaveDb(wdb); - - //ȡڵˮ - xxwms_ctrl ctrl = idb.xxwms_ctrl.Where(p => p.xxwms_table == "xxwms_ld_det").OrderByDescending(p => p.xxwms_seq).FirstOrDefault(); - - if (ctrl != null && !string.IsNullOrEmpty(ctrl.xxwms_seq)) - { - Console.WriteLine($" WMS ӿݣ{ctrl.xxwms_table}:{ctrl.xxwms_table_qty}"); - UpdateMaterialStocks(idb, wdb, ctrl.xxwms_seq); - - EntitiesFactory.SaveDb(wdb); - } - } - } - Console.WriteLine($"WMS ӿݣ{wmsCtrlList.Count.ToString()}"); - foreach (var wmsCtrl in wmsCtrlList) - { - if (tableNameList.All(p => p.Name != wmsCtrl.xxwms_table)) continue; - try - { - ScpEntities wdb = EntitiesFactory.CreateScpInstance(); - //Console.WriteLine($" WMS ӿݣ{wmsCtrl.xxwms_table}:{wmsCtrl.xxwms_table_qty}"); - - WmsTableName wmsTableName; - Enum.TryParse(wmsCtrl.xxwms_table, false, out wmsTableName); - switch (wmsTableName) - { - case WmsTableName.xxwms_ld_det://ԭϿ - if (GlobalVar.ApiConfig.Wms) - { - //Console.WriteLine($" WMS ӿݣ{wmsCtrl.xxwms_table}:{wmsCtrl.xxwms_table_qty}"); - //UpdateMaterialStocks(idb, wdb, wmsCtrl.xxwms_seq); - } - else - continue; - break; - case WmsTableName.xxwms_rc_det://ջ - //TODO - if (GlobalVar.ApiConfig.Wmsջ) - { - Console.WriteLine($" WMS ӿݣ{wmsCtrl.xxwms_table}:{wmsCtrl.xxwms_table_qty}"); - AddMaterialReceive(idb, wdb, wmsCtrl.xxwms_seq, 0);//xxwms_seq:ˮ - } - break; - case WmsTableName.xxwms_rt_det: - //TODO - if (GlobalVar.ApiConfig.Wms˻) - { - Console.WriteLine($" WMS ӿݣ{wmsCtrl.xxwms_table}:{wmsCtrl.xxwms_table_qty}"); - AddMaterialReturn(idb, wdb, wmsCtrl.xxwms_seq, 1);//xxwms_seq:ˮ - } - break; - case WmsTableName.xxwms_arv_det: - //TODO - if (GlobalVar.ApiConfig.Wms) - { - Console.WriteLine($" WMS ӿݣ{wmsCtrl.xxwms_table}:{wmsCtrl.xxwms_table_qty}"); - AddMaterialArrive(idb, wdb, wmsCtrl.xxwms_seq);//xxwms_seq:ˮ - } - break; - - case WmsTableName.xxwms_qua_det: - //TODO - if (GlobalVar.ApiConfig.Wms) - { - Console.WriteLine($" WMS ӿݣ{wmsCtrl.xxwms_table}:{wmsCtrl.xxwms_table_qty}"); - AddMaterialQuality(idb, wdb, wmsCtrl.xxwms_seq); - } - break; - } - - wmsCtrl.xxwms_scm = ((int)UniApiState.ɹ).ToString(); - EntitiesFactory.SaveDb(wdb); - } - catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//ʵ֤쳣 - { - var sb = new StringBuilder(); - foreach (var error in dbEx.EntityValidationErrors.ToList()) - { - - error.ValidationErrors.ToList().ForEach(i => - { - sb.AppendFormat("{0}ֶΣ{1}Ϣ{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); - }); - } - wmsCtrl.xxwms_scm = ((int)UniApiState.ʧ).ToString(); - wmsCtrl.xxwms_rmks += " SCM:" + sb.ToString(); - } - catch (OptimisticConcurrencyException ex)//ͻ쳣 - { - wmsCtrl.xxwms_scm = ((int)UniApiState.ʧ).ToString(); - wmsCtrl.xxwms_rmks += " SCM:" + ex.Message; - } - - - catch (Exception ex) - { - wmsCtrl.xxwms_scm = ((int)UniApiState.ʧ).ToString(); - wmsCtrl.xxwms_rmks += " SCM:" + ex.Message; - - } - finally - { - EntitiesFactory.SaveDb(idb); - } - } - } - - /// <summary> - /// ԭϿ - /// </summary> - /// <param name="idb"></param> - /// <param name="wdb"></param> - /// <param name="seq"></param> - private static void UpdateMaterialStocks(UniApiEntities idb, ScpEntities wdb, string seq) - { - var wmsld_detList = idb.xxwms_ld_det.Where(p => p.xxwms_ld_seq == seq).ToList(); - var scpRcvList = new List<TS_STOCK>(); - - foreach (var wmsld_detData in wmsld_detList) - { - var scpRcv = new TS_STOCK - { - BarCode = wmsld_detData.xxwms_ld_barcode,//ǩ - Site = wmsld_detData.xxwms_ld_domain,// - PartCode = wmsld_detData.xxwms_ld_part,// - VendId = wmsld_detData.xxwms_ld_vend,//Ӧ̱ - LocCode = wmsld_detData.xxwms_ld_loc,//λ - Batch = wmsld_detData.xxwms_ld_lot,// - VendBatch = wmsld_detData.xxwms_ld_vend_batch,//Ӧ - Qty = wmsld_detData.xxwms_ld_qty,// - ReceiveDate = wmsld_detData.xxwms_ld_date,//ջ - ProduceDate = wmsld_detData.xxwms_ld_time,//ʱ - LocUnit = wmsld_detData.xxwms_ld_um,//λ - Remark = "",//ע - State = (int)FormState.ر, - CreateTime = wmsld_detData.xxwms_ld_createdt == null ? DateTime.Now : (DateTime)wmsld_detData.xxwms_ld_createdt,// - CreateUser = wmsld_detData.xxwms_ld_createur//û - }; - scpRcvList.Add(scpRcv); - } - wdb.TS_STOCK.AddOrUpdate(scpRcvList.ToArray()); - Console.WriteLine($" ԭϿ ݣ{wmsld_detList.Count}"); - } - - /// <summary> - ///ջ - /// </summary> - /// <param name="idb"></param> - /// <param name="wdb"></param> - /// <param name="seq">ˮ</param> - /// <param name="billtype">0:ջ,1:˻</param> - private static void AddMaterialReceive(UniApiEntities idb, ScpEntities wdb, string seq, int billtype) - { - //var qadRcvDetailList = idb.xxqad_prh_det.Where(p => p.xxqad_prh_seq == seq).ToList(); - var qadRcvDetailList = idb.xxwms_rc_det.Where(p => p.xxwms_rc_seq == seq).ToList(); - var scpRcvList = new List<TB_RECEIVE>(); - var scpRcveDetailList = new List<TB_RECEIVE_DETAIL>(); - - //xxwms_rc_po_nbrɹֶȥ - var qadReceiveNbrList = qadRcvDetailList.Select(p => p.xxwms_rc_nbr.ToUpper()).DistinctBy(p => p); - - foreach (var qadRcvNbrList in qadReceiveNbrList) - { - //qadRcvDetailListͬһxxqad_prh_receiverм¼ - var qadDataList = qadRcvDetailList.Where(p => p.xxwms_rc_nbr == qadRcvNbrList).ToList(); - if (qadDataList.Count == 0) - { - continue; - } - - var firstqadData = qadDataList[0]; - //var scpRcv = wdb.TB_RECEIVE.SingleOrDefault(p => p.BillNum == qadRcvNbrList); - //var scpRcv = wdb.TB_RECEIVE.SingleOrDefault(p => p.PoBillNum != null && p.PoBillNum == qadRcvNbrList); - var scpRcv = wdb.TB_RECEIVE.SingleOrDefault(p => p.RecvBillNum != null && p.RecvBillNum == qadRcvNbrList); - - //ж0100ջԶǷΪ - bool isRerviceOk = false; - if (!string.IsNullOrEmpty(firstqadData.xxwms_rc_domain)) - { - string site = firstqadData.xxwms_rc_domain;//0100 - List<TA_FACTORY_CONFIG> configs = wdb.TA_FACTORY_CONFIG.Where(p => p.FactoryId == site).ToList(); - - foreach (TA_FACTORY_CONFIG cfg in configs) - { - TA_CONFIG tacfg = wdb.TA_CONFIG.Where(p => p.UID == cfg.ConfigId).SingleOrDefault(); - if(tacfg != null && !string.IsNullOrEmpty(tacfg.ParamName) && tacfg.ParamName == "ջԶ") - { - if ("" == tacfg.ParamValue) - { - isRerviceOk = true; - } - } - } - } - if (scpRcv == null) - { - - //scpRcv = new TB_RECEIVE - //{ - // BillNum = qadRcvNbrList, - // BillType = firstqadData.xxqad_prh_trtype == "RCT-PO" ? (int)ReceiveBillType.Receive : (int)ReceiveBillType.Reject, - // BillTime = firstqadData.xxqad_prh_createdt, - // OperName = firstqadData.xxqad_prh_createur, - // State = (int)FormState.ر, - // Remark = "", - //}; - int istate = 0; - if (isRerviceOk == false) - { - istate = (int)FormState.ر; - } - else - { - istate = (int)FormState.; - } - scpRcv = new TB_RECEIVE - { - RecvBillNum = qadRcvNbrList,//ջ - - State = istate, - Remark = "", - CreateTime = firstqadData.xxwms_rc_createdt == null ? DateTime.Now : (DateTime)firstqadData.xxwms_rc_createdt,// - CreateUser = firstqadData.xxwms_rc_createur,//û - IsDeleted = false, - GUID = System.Guid.NewGuid(), - BillType = billtype - }; - scpRcvList.Add(scpRcv); - } - scpRcv.PoBillNum = firstqadData.xxwms_rc_po_nbr;//ɹ - scpRcv.AsnBillNum = firstqadData.xxwms_rc_ps_nbr;// - scpRcv.Site = firstqadData.xxwms_rc_domain;//ص - scpRcv.VendId = firstqadData.xxwms_rc_vend;// - scpRcv.ShipTime = firstqadData.xxwms_rc_date_ship;//ջ - - //var scpAsn = wdb.TF_ASN.FirstOrDefault(p => p.BillNum == scpRcv.AsnBillNum); - var scpAsn = wdb.TB_ASN.FirstOrDefault(p => p.PoBillNum == scpRcv.AsnBillNum);//==ջ - if (scpAsn != null) - { - scpAsn.State = (int)ShipState.Receive; - } - foreach (var qadData in qadDataList) - { - try - { - var poLineNum = Convert.ToInt32(qadData.xxwms_rc_po_line); - //var scpRcvDetail = - // wdb.TB_RECEIVE_DETAIL.SingleOrDefault( - // p => p.BillNum == qadRcvNbrList && - // p.PoBillNum == qadData.xxqad_prh_po_nbr && - // p.PoLineNum == poLineNum && - // p.AsnBillNum == qadData.xxqad_prh_psnbr && - // p.PartCode == qadData.xxqad_prh_part && - // p.Batch == qadData.xxqad_prh_lot); - var scpRcvDetail = - wdb.TB_RECEIVE_DETAIL.SingleOrDefault( - p => p.RecvBillNum == qadRcvNbrList && - p.PoBillNum == qadData.xxwms_rc_po_nbr && - p.PoLine == poLineNum && - p.PartCode == qadData.xxwms_rc_part && - p.Batch == qadData.xxwms_rc_lot); - if (scpRcvDetail == null) - { - int istate = 0; - if (isRerviceOk == false) - { - istate = (int)FormState.ر; - } - else - { - istate = (int)FormState.; - } - scpRcvDetail = new TB_RECEIVE_DETAIL - { - RecvBillNum = qadRcvNbrList,//ջ - PoBillNum = qadData.xxwms_rc_po_nbr,//ɹ - PoLine = poLineNum,// - PartCode = qadData.xxwms_rc_part,// - Batch = qadData.xxwms_rc_lot,// - VendBatch = qadData.xxwms_rc_vend_batch,//Ӧ - PoUnit = qadData.xxwms_rc_po_um,//ɹλ - LocUnit = qadData.xxwms_rc_loc_um,//λ - Qty = qadData.xxwms_rc_qty_total,//ջ - //DockCode = ?,//ջ - State = istate,// (int)FormState.ر, - Remark = firstqadData.xxwms_rc_domain, - CreateTime = qadData.xxwms_rc_createdt == null ? DateTime.Now : (DateTime)qadData.xxwms_rc_createdt,// - CreateUser = qadData.xxwms_rc_createur,//û - IsDeleted = false, - GUID = System.Guid.NewGuid(), - BillType = billtype - }; - scpRcveDetailList.Add(scpRcvDetail); - } - //var scpPoDetail = - // wdb.TF_PO_DETAIL.FirstOrDefault( - // p => p.ErpBillNum == qadData.xxqad_prh_po_nbr && p.LineNum == poLineNum); - //if (scpPoDetail != null) - //{ - // scpPoDetail.ReceivedQty += scpRcvDetail.ReceivedQty; - // if (scpRcv.BillType == (int)ReceiveBillType.Reject) - // scpPoDetail.RejectQty -= scpRcvDetail.ReceivedQty; - //} - - - var scpPoDetail = - wdb.TB_PO_DETAIL.FirstOrDefault( - p => p.PoBillNum == qadData.xxwms_rc_po_nbr && p.PoLine == poLineNum); - if (scpPoDetail != null) - { - //ϸReceivedQty += ջϸQtyѽ - scpPoDetail.ReceivedQty += scpRcvDetail.Qty; - } - - //var scpPo = wdb.TF_PO.FirstOrDefault(p => p.ErpBillNum == qadData.xxqad_prh_po_nbr); - //if (scpPo != null) - //{ - - // var scpPoDetails = wdb.TF_PO_DETAIL.Where(p => p.ErpBillNum == qadData.xxqad_prh_po_nbr); - // if (scpPoDetails.All(p => p.BillQty == p.ReceivedQty)) - // scpPo.State = (int)PlanState.Complete; - //} - var scpPo = wdb.TB_PO.FirstOrDefault(p => p.ErpBillNum == qadData.xxwms_rc_po_nbr); - if (scpPo != null) - { - //ϸ - var scpPoDetails = wdb.TB_PO_DETAIL.Where(p => p.PoBillNum == qadData.xxwms_rc_po_nbr); - //if (scpPoDetails.All(p => p.BillQty == p.ReceivedQty)) - // scpPo.State = (int)PlanState.Complete; - if (scpPoDetails.All(p => p.PlanQty == p.ReceivedQty))//== - { - scpPo.State = (int)PlanState.Complete; - //var _detail = wdb.TB_ASK_DETAIL.Where(p => p.PoBillNum == qadData.xxwms_rc_po_nbr && p.PoLine == poLineNum ); - //if (_detail!=null && _detail.Count() > 0) - //{ - // var _qty=_detail.Sum(p=>p.AskQty); - // if(_qty== p.ReceivedQty) - //} - } - } - qadData.xxwms_rc_wmsread = ((int)UniApiState.ɹ).ToString(); - } - catch (Exception ex) - { - qadData.xxwms_rc_wmsread = ((int)UniApiState.ʧ).ToString(); - qadData.xxwms_rc_rmks += " SCM:" + ex.Message; - } - qadData.xxwms_rc_updateur = ScpCache.Config.SCPû; - qadData.xxwms_rc_updatedt = DateTime.Now; - } - - } - wdb.TB_RECEIVE.AddOrUpdate(scpRcvList.ToArray()); - wdb.TB_RECEIVE_DETAIL.AddOrUpdate(scpRcveDetailList.ToArray()); - Console.WriteLine($" ջ ݣ{qadRcvDetailList.Count}"); - } - - #region WMS - private static void AddMaterialQuality(UniApiEntities idb, ScpEntities sdb, string seq) - { - var wms_qualList = idb.xxwms_qua_det.Where(p => p.xxwms_qua_seq == seq).ToList(); - var _qualList = new List<TB_QUALITY>(); - foreach (var itm in wms_qualList) - { - var scpQual = new TB_QUALITY(); - - scpQual.Type = itm.xxwms_qua_infotype; - scpQual.Barcode = itm.xxwms_qua_barcode; - scpQual.Loccode = itm.xxwms_qua_loccode; - scpQual.Pobillnum = itm.xxwms_qua_pobillnum; - scpQual.Poline = (decimal)itm.xxwms_qua_poline; - scpQual.Inspecttype = itm.xxwms_qua_inspecttype; - scpQual.Partcode = itm.xxwms_qua_partcode; - scpQual.Batch = itm.xxwms_qua_batch; - scpQual.ReceiveQty = itm.xxwms_qua_receiveqty; - scpQual.SampleQty = itm.xxwms_qua_sampleqty; - scpQual.Inspqty = itm.xxwms_qua_inspqty; - scpQual.Passqty = itm.xxwms_qua_passqty; - scpQual.Failqty = itm.xxwms_qua_failqty; - scpQual.Crackqty = itm.xxwms_qua_crackqty; - scpQual.Inspresult = itm.xxwms_qua_inspresult; - scpQual.Failreason = itm.xxwms_qua_failreason; - scpQual.Vendid = itm.xxwms_qua_vendid; - scpQual.Vendbatch = itm.xxwms_qua_vendbatch; - scpQual.state = itm.xxwms_qua_state; - scpQual.Billtime = itm.xxwms_qua_billtime; - scpQual.Domain = itm.xxwms_qua_domain; - scpQual.Site = itm.xxwms_qua_domain; - scpQual.By1 = itm.xxwms_qua_by1; - scpQual.By2 = itm.xxwms_qua_by2; - scpQual.By3 = itm.xxwms_qua_by3; - scpQual.CreateTime = itm.xxwms_qua_createdt??DateTime.Now; - scpQual.CreateUser = itm.xxwms_qua_createur; - scpQual.UpdateTime = itm.xxwms_qua_updatedt; - scpQual.UpdateUser = itm.xxwms_qua_updateur; - scpQual.GUID = Guid.NewGuid(); - - _qualList.Add(scpQual); - sdb.TB_QUALITY.Add(scpQual); - } - //sdb.TB_QUALITY.Add(_qualList.ToArray()); - Console.WriteLine($"ݣ{_qualList.Count}"); - } - - #endregion - - - /// <summary> - /// ˻ - /// </summary> - private static void AddMaterialReturn(UniApiEntities idb, ScpEntities wdb, string seq, int billtype) - { - //var qadRcvDetailList = idb.xxqad_prh_det.Where(p => p.xxqad_prh_seq == seq).ToList(); - var qadRcvDetailList = idb.xxwms_rt_det.Where(p => p.xxwms_rt_seq == seq).ToList(); - var scpRcvList = new List<TB_RECEIVE>(); - var scpRcveDetailList = new List<TB_RECEIVE_DETAIL>(); - - //xxqad_prh_receiverֶȥ - var qadReceiveNbrList = qadRcvDetailList.Select(p => p.xxwms_rt_nbr.ToUpper()).DistinctBy(p => p); - - foreach (var qadRcvNbrList in qadReceiveNbrList) - { - //qadRcvDetailListͬһxxqad_prh_receiverм¼ - var qadDataList = qadRcvDetailList.Where(p => p.xxwms_rt_nbr == qadRcvNbrList).ToList(); - if (qadDataList.Count == 0) - { - continue; - } - var firstqadData = qadDataList[0]; - //var scpRcv = wdb.TB_RECEIVE.SingleOrDefault(p => p.BillNum == qadRcvNbrList); - //var scpRcv = wdb.TB_REJECT.SingleOrDefault(p => p.PoBillNum == qadRcvNbrList); - var scpRcv = wdb.TB_RECEIVE.SingleOrDefault(p => p.RecvBillNum == qadRcvNbrList); - - //ж0100ջԶǷΪ - bool isRerviceOk = false; - if (!string.IsNullOrEmpty(firstqadData.xxwms_rt_domain)) - { - string site = firstqadData.xxwms_rt_domain;//0100 - List<TA_FACTORY_CONFIG> configs = wdb.TA_FACTORY_CONFIG.Where(p => p.FactoryId == site).ToList(); - - foreach (TA_FACTORY_CONFIG cfg in configs) - { - TA_CONFIG tacfg = wdb.TA_CONFIG.Where(p => p.UID == cfg.ConfigId).SingleOrDefault(); - if (tacfg != null && !string.IsNullOrEmpty(tacfg.ParamName) && tacfg.ParamName == "ջԶ") - { - if ("" == tacfg.ParamValue) - { - isRerviceOk = true; - } - } - } - } - if (scpRcv == null) - { - int istate = 0; - if (isRerviceOk == false) - { - istate = (int)FormState.ر; - } - else - { - istate = (int)FormState.; - } - - scpRcv = new TB_RECEIVE - { - RecvBillNum = qadRcvNbrList,//˻ - State = istate, - Remark = "", - CreateTime = firstqadData.xxwms_rt_createdt == null ? DateTime.Now : (DateTime)firstqadData.xxwms_rt_createdt,// - CreateUser = firstqadData.xxwms_rt_createur,//û - IsDeleted = false, - GUID = System.Guid.NewGuid(), - BillType = billtype - }; - scpRcvList.Add(scpRcv); - } - scpRcv.PoBillNum = firstqadData.xxwms_rt_po_nbr;//ɹ - //scpRcv.AsnBillNum = firstqadData.xxqad_prh_psnbr;// - scpRcv.Site = firstqadData.xxwms_rt_domain;//ص - scpRcv.VendId = firstqadData.xxwms_rt_vend;// - scpRcv.ShipTime = firstqadData.xxwms_rt_date_ship;//ջ - //var scpAsn = wdb.TF_ASN.FirstOrDefault(p => p.BillNum == scpRcv.AsnBillNum); - var scpAsn = wdb.TB_ASN.FirstOrDefault(p => p.PoBillNum == scpRcv.AsnBillNum);//==˻ - if (scpAsn != null) - scpAsn.State = (int)ShipState.Reject; - foreach (var qadData in qadDataList) - { - try - { - var poLineNum = Convert.ToInt32(qadData.xxwms_rt_po_line); - //var scpRcvDetail = - // wdb.TB_RECEIVE_DETAIL.SingleOrDefault( - // p => p.BillNum == qadRcvNbrList && - // p.PoBillNum == qadData.xxqad_prh_po_nbr && - // p.PoLineNum == poLineNum && - // p.AsnBillNum == qadData.xxqad_prh_psnbr && - // p.PartCode == qadData.xxqad_prh_part && - // p.Batch == qadData.xxqad_prh_lot); - var scpRcvDetail = - wdb.TB_RECEIVE_DETAIL.SingleOrDefault( - p => p.RecvBillNum == qadRcvNbrList && - p.PoBillNum == qadData.xxwms_rt_po_nbr && - p.PoLine == poLineNum && - p.PartCode == qadData.xxwms_rt_part && - p.Batch == qadData.xxwms_rt_lot); - if (scpRcvDetail == null) - { - int istate = 0; - if (isRerviceOk == false) - { - istate = (int)FormState.ر; - } - else - { - istate = (int)FormState.; - } - scpRcvDetail = new TB_RECEIVE_DETAIL - { - RecvBillNum = qadRcvNbrList,//˻ - PoBillNum = qadData.xxwms_rt_po_nbr,//ɹ - PoLine = poLineNum,// - PartCode = qadData.xxwms_rt_part,//Ϻ - Batch = qadData.xxwms_rt_lot,// - VendBatch = qadData.xxwms_rt_vend_batch,//Ӧ - PoUnit = qadData.xxwms_rt_po_um,//ɹλ - LocUnit = qadData.xxwms_rt_loc_um,//λ - Qty = qadData.xxwms_rt_qty_total,//˻ - State = istate,// (int)FormState.ر, - Remark = firstqadData.xxwms_rt_domain, - CreateTime = qadData.xxwms_rt_createdt == null ? DateTime.Now : (DateTime)qadData.xxwms_rt_createdt,// - CreateUser = qadData.xxwms_rt_createur,//û - IsDeleted = false, - GUID = System.Guid.NewGuid(), - BillType = billtype - }; - scpRcveDetailList.Add(scpRcvDetail); - } - //var scpPoDetail = - // wdb.TF_PO_DETAIL.FirstOrDefault( - // p => p.ErpBillNum == qadData.xxqad_prh_po_nbr && p.LineNum == poLineNum); - //if (scpPoDetail != null) - //{ - // scpPoDetail.ReceivedQty += scpRcvDetail.ReceivedQty; - // if (scpRcv.BillType == (int)ReceiveBillType.Reject) - // scpPoDetail.RejectQty -= scpRcvDetail.ReceivedQty; - //} - var scpPoDetail = - wdb.TB_PO_DETAIL.FirstOrDefault( - p => p.PoBillNum == qadData.xxwms_rt_po_nbr && p.PoLine == poLineNum); - if (scpPoDetail != null) - { - //ϸRejectQty += ˻ϸQtyѽ - scpPoDetail.RejectQty -= scpRcvDetail.Qty; - } - - //var scpPo = wdb.TF_PO.FirstOrDefault(p => p.ErpBillNum == qadData.xxqad_prh_po_nbr); - //if (scpPo != null) - //{ - - // var scpPoDetails = wdb.TF_PO_DETAIL.Where(p => p.ErpBillNum == qadData.xxqad_prh_po_nbr); - // if (scpPoDetails.All(p => p.BillQty == p.ReceivedQty)) - // scpPo.State = (int)PlanState.Complete; - //} - var scpPo = wdb.TB_PO.FirstOrDefault(p => p.ErpBillNum == qadData.xxwms_rt_po_nbr); - if (scpPo != null) - { - //ϸ - var scpPoDetails = wdb.TB_PO_DETAIL.Where(p => p.PoBillNum == qadData.xxwms_rt_po_nbr); - //if (scpPoDetails.All(p => p.BillQty == p.ReceivedQty)) - // scpPo.State = (int)PlanState.Complete; - if (scpPoDetails.All(p => p.PlanQty == p.ReceivedQty)) //== - scpPo.State = (int)PlanState.Complete; - } - qadData.xxwms_rt_wmsread = ((int)UniApiState.ɹ).ToString(); - } - catch (Exception ex) - { - qadData.xxwms_rt_wmsread = ((int)UniApiState.ʧ).ToString(); - qadData.xxwms_rt_rmks += " SCM:" + ex.Message; - } - qadData.xxwms_rt_updateur = ScpCache.Config.SCPû; - qadData.xxwms_rt_updatedt = DateTime.Now; - - } - - } - wdb.TB_RECEIVE.AddOrUpdate(scpRcvList.ToArray()); - wdb.TB_RECEIVE_DETAIL.AddOrUpdate(scpRcveDetailList.ToArray()); - Console.WriteLine($" ˻ ݣ{qadRcvDetailList.Count}"); - } - - /// <summary> - ///յ - /// </summary> - /// <param name="idb"></param> - /// <param name="wdb"></param> - /// <param name="seq">ˮ</param> - private static void AddMaterialArrive(UniApiEntities idb, ScpEntities wdb, string seq) - { - //var qadRcvDetailList = idb.xxqad_prh_det.Where(p => p.xxqad_prh_seq == seq).ToList(); - var qadRcvDetailList = idb.xxwms_arv_det.Where(p => p.xxwms_arv_seq == seq).ToList(); - var scpRcvList = new List<TB_ARRIVE>(); - var scpRcveDetailList = new List<TB_ARRIVE_DETAIL>(); - - //xxwms_rc_po_nbrɹֶȥ - var qadReceiveNbrList = qadRcvDetailList.Select(p => p.xxwms_arv_nbr.ToUpper()).DistinctBy(p => p); - - foreach (var qadRcvNbrList in qadReceiveNbrList) - { - //qadRcvDetailListͬһxxqad_prh_receiverм¼ - var qadDataList = qadRcvDetailList.Where(p => p.xxwms_arv_nbr == qadRcvNbrList).ToList(); - if (qadDataList.Count == 0) - { - continue; - } - - var firstqadData = qadDataList[0]; - //var scpRcv = wdb.TB_RECEIVE.SingleOrDefault(p => p.BillNum == qadRcvNbrList); - //var scpRcv = wdb.TB_RECEIVE.SingleOrDefault(p => p.PoBillNum != null && p.PoBillNum == qadRcvNbrList); - var scpRcv = wdb.TB_ARRIVE.SingleOrDefault(p => p.ArrvBillNum != null && p.ArrvBillNum == qadRcvNbrList); - - //ж0100ջԶǷΪ - bool isRerviceOk = false; - if (!string.IsNullOrEmpty(firstqadData.xxwms_arv_site)) - { - string site = firstqadData.xxwms_arv_site;//0100 - List<TA_FACTORY_CONFIG> configs = wdb.TA_FACTORY_CONFIG.Where(p => p.FactoryId == site).ToList(); - - foreach (TA_FACTORY_CONFIG cfg in configs) - { - TA_CONFIG tacfg = wdb.TA_CONFIG.Where(p => p.UID == cfg.ConfigId).SingleOrDefault(); - if (tacfg != null && !string.IsNullOrEmpty(tacfg.ParamName) && tacfg.ParamName == "ջԶ") - { - if ("" == tacfg.ParamValue) - { - isRerviceOk = true; - } - } - } - } - if (scpRcv == null) - { - int istate = 0; - if (isRerviceOk == false) - { - istate = (int)FormState.ر; - } - else - { - istate = (int)FormState.; - } - scpRcv = new TB_ARRIVE - { - ArrvBillNum = qadRcvNbrList,// - State = istate, - Remark = "", - CreateTime = firstqadData.xxwms_arv_createdt == null ? DateTime.Now : (DateTime)firstqadData.xxwms_arv_createdt,// - CreateUser = firstqadData.xxwms_arv_createur,//û - IsDeleted = false, - GUID = System.Guid.NewGuid(), - BillType = string.IsNullOrEmpty(firstqadData.xxwms_arv_trtype) ? 1 : int.Parse(firstqadData.xxwms_arv_trtype) //1-ջ 2-˻ - }; - scpRcvList.Add(scpRcv); - } - scpRcv.PoBillNum = firstqadData.xxwms_arv_po_nbr;//ɹ - scpRcv.AsnBillNum = firstqadData.xxwms_arv_ps_nbr;// - scpRcv.Site = firstqadData.xxwms_arv_site;//ص - scpRcv.VendId = firstqadData.xxwms_arv_vend;// - scpRcv.ShipTime = firstqadData.xxwms_arv_date_ship;//ջ - - foreach (var qadData in qadDataList) - { - try - { - var poLineNum = Convert.ToInt32(qadData.xxwms_arv_po_line); - //var scpRcvDetail = - // wdb.TB_RECEIVE_DETAIL.SingleOrDefault( - // p => p.BillNum == qadRcvNbrList && - // p.PoBillNum == qadData.xxqad_prh_po_nbr && - // p.PoLineNum == poLineNum && - // p.AsnBillNum == qadData.xxqad_prh_psnbr && - // p.PartCode == qadData.xxqad_prh_part && - // p.Batch == qadData.xxqad_prh_lot); - var scpRcvDetail = - wdb.TB_ARRIVE_DETAIL.SingleOrDefault( - p => p.ArrvBillNum == qadRcvNbrList && - p.PoBillNum == qadData.xxwms_arv_po_nbr && - p.PoLine == poLineNum && - p.PartCode == qadData.xxwms_arv_part && - p.Batch == qadData.xxwms_arv_lot); - if (scpRcvDetail == null) - { - int istate = 0; - if (isRerviceOk == false) - { - istate = (int)FormState.ر; - } - else - { - istate = (int)FormState.; - } - scpRcvDetail = new TB_ARRIVE_DETAIL - { - ArrvBillNum = qadRcvNbrList,// - PoBillNum = qadData.xxwms_arv_po_nbr,//ɹ - PoLine = poLineNum,// - PartCode = qadData.xxwms_arv_part,// - Batch = qadData.xxwms_arv_lot,// - VendBatch = qadData.xxwms_arv_vend_batch,//Ӧ - PoUnit = qadData.xxwms_arv_po_um,//ɹλ - LocUnit = qadData.xxwms_arv_loc_um,//λ - Qty = qadData.xxwms_arv_qty_total,//ջ - //DockCode = ?,//ջ - State = istate,// (int)FormState.ر, - Remark = "", - CreateTime = qadData.xxwms_arv_createdt == null ? DateTime.Now : (DateTime)qadData.xxwms_arv_createdt,// - CreateUser = qadData.xxwms_arv_createur,//û - IsDeleted = false, - GUID = System.Guid.NewGuid(), - BillType = string.IsNullOrEmpty(firstqadData.xxwms_arv_trtype) ? 1 : int.Parse(firstqadData.xxwms_arv_trtype) //1-ջ 2-˻ - }; - scpRcveDetailList.Add(scpRcvDetail); - } - - //var scpPoDetail = - // wdb.TB_PO_DETAIL.FirstOrDefault( - // p => p.PoBillNum == qadData.xxwms_arv_po_nbr && p.PoLine == poLineNum); - //if (scpPoDetail != null) - //{ - // //ϸReceivedQty += ջϸQtyѽ - // scpPoDetail.ReceivedQty += scpRcvDetail.Qty; - //} - - //var scpPo = wdb.TB_PO.FirstOrDefault(p => p.ErpBillNum == qadData.xxwms_arv_po_nbr); - //if (scpPo != null) - //{ - // //ϸ - // var scpPoDetails = wdb.TB_PO_DETAIL.Where(p => p.PoBillNum == qadData.xxwms_arv_po_nbr); - // //if (scpPoDetails.All(p => p.BillQty == p.ReceivedQty)) - // // scpPo.State = (int)PlanState.Complete; - // if (scpPoDetails.All(p => p.PlanQty == p.ReceivedQty)) //== - // scpPo.State = (int)PlanState.Complete; - //} - qadData.xxwms_arv_wmsread = ((int)UniApiState.ɹ).ToString(); - } - catch (Exception ex) - { - qadData.xxwms_arv_wmsread = ((int)UniApiState.ʧ).ToString(); - qadData.xxwms_arv_rmks += " SCM:" + ex.Message; - } - qadData.xxwms_arv_updateur = ScpCache.Config.SCPû; - qadData.xxwms_arv_updatedt = DateTime.Now; - } - } - wdb.TB_ARRIVE.AddOrUpdate(scpRcvList.ToArray()); - wdb.TB_ARRIVE_DETAIL.AddOrUpdate(scpRcveDetailList.ToArray()); - Console.WriteLine($" ݣ{qadRcvDetailList.Count}"); - } - - } -} \ No newline at end of file diff --git a/CK.SCP.UniApi_CQ/ERP接口设置.ini b/CK.SCP.UniApi_CQ/ERP接口设置.ini deleted file mode 100644 index e327a15..0000000 Binary files a/CK.SCP.UniApi_CQ/ERP接口设置.ini and /dev/null differ diff --git a/CK.SCP.UniApi_CQ/Form1.Designer.cs b/CK.SCP.UniApi_CQ/Form1.Designer.cs deleted file mode 100644 index 3b0cf51..0000000 --- a/CK.SCP.UniApi_CQ/Form1.Designer.cs +++ /dev/null @@ -1,39 +0,0 @@ -namespace CK.SCP.UniApi_CQ -{ - partial class Form1 - { - /// <summary> - /// 必需的设计器变量。 - /// </summary> - private System.ComponentModel.IContainer components = null; - - /// <summary> - /// 清理所有正在使用的资源。 - /// </summary> - /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param> - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows 窗体设计器生成的代码 - - /// <summary> - /// 设计器支持所需的方法 - 不要修改 - /// 使用代码编辑器修改此方法的内容。 - /// </summary> - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Text = "Form1"; - } - - #endregion - } -} - diff --git a/CK.SCP.UniApi_CQ/Form1.cs b/CK.SCP.UniApi_CQ/Form1.cs deleted file mode 100644 index f3dcdd0..0000000 --- a/CK.SCP.UniApi_CQ/Form1.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace CK.SCP.UniApi_CQ -{ - public partial class Form1 : Form - { - public Form1() - { - InitializeComponent(); - } - } -} diff --git a/CK.SCP.UniApi_CQ/FormMain.Designer.cs b/CK.SCP.UniApi_CQ/FormMain.Designer.cs deleted file mode 100644 index 9b83d2b..0000000 --- a/CK.SCP.UniApi_CQ/FormMain.Designer.cs +++ /dev/null @@ -1,435 +0,0 @@ -namespace CK.SCP.GrupUniApi -{ - partial class FormMain - { - /// <summary> - /// 必需的设计器变量。 - /// </summary> - private System.ComponentModel.IContainer components = null; - - /// <summary> - /// 清理所有正在使用的资源。 - /// </summary> - /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param> - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows 窗体设计器生成的代码 - - /// <summary> - /// 设计器支持所需的方法 - 不要修改 - /// 使用代码编辑器修改此方法的内容。 - /// </summary> - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormMain)); - this.txtLog = new System.Windows.Forms.TextBox(); - this.styleManager1 = new DevComponents.DotNetBar.StyleManager(this.components); - this.layoutControl1 = new DevComponents.DotNetBar.Layout.LayoutControl(); - this.listLog = new System.Windows.Forms.ListView(); - this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); - this.expandableSplitter2 = new DevComponents.DotNetBar.ExpandableSplitter(); - this.panelEx1 = new DevComponents.DotNetBar.PanelEx(); - this.btnStart = new DevComponents.DotNetBar.ButtonX(); - this.btnClose = new DevComponents.DotNetBar.ButtonX(); - this.btnRefresh = new DevComponents.DotNetBar.ButtonX(); - this.btnStop = new DevComponents.DotNetBar.ButtonX(); - this.btnClearLog = new DevComponents.DotNetBar.ButtonX(); - this.btnSetting = new DevComponents.DotNetBar.ButtonX(); - this.pnlCtrl = new DevComponents.DotNetBar.PanelEx(); - this.panelEx2 = new DevComponents.DotNetBar.PanelEx(); - this.BtnErpPut = new CktUniApiButton(); - this.BtnErpGet = new CktUniApiButton(); - this.bar1 = new DevComponents.DotNetBar.Bar(); - this.labelItem1 = new DevComponents.DotNetBar.LabelItem(); - this.txtDomain = new DevComponents.DotNetBar.TextBoxItem(); - this.labelItem2 = new DevComponents.DotNetBar.LabelItem(); - this.txtSite = new DevComponents.DotNetBar.TextBoxItem(); - this.labelItem4 = new DevComponents.DotNetBar.LabelItem(); - this.txtVersion = new DevComponents.DotNetBar.TextBoxItem(); - this.panelEx1.SuspendLayout(); - this.pnlCtrl.SuspendLayout(); - this.panelEx2.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.bar1)).BeginInit(); - this.SuspendLayout(); - // - // txtLog - // - this.txtLog.Dock = System.Windows.Forms.DockStyle.Bottom; - this.txtLog.Font = new System.Drawing.Font("微软雅黑", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.txtLog.Location = new System.Drawing.Point(0, 512); - this.txtLog.Margin = new System.Windows.Forms.Padding(2); - this.txtLog.Multiline = true; - this.txtLog.Name = "txtLog"; - this.txtLog.ReadOnly = true; - this.txtLog.ScrollBars = System.Windows.Forms.ScrollBars.Both; - this.txtLog.Size = new System.Drawing.Size(614, 139); - this.txtLog.TabIndex = 5; - // - // styleManager1 - // - this.styleManager1.ManagerStyle = DevComponents.DotNetBar.eStyle.Office2010Blue; - this.styleManager1.MetroColorParameters = new DevComponents.DotNetBar.Metro.ColorTables.MetroColorGeneratorParameters(System.Drawing.Color.White, System.Drawing.Color.FromArgb(((int)(((byte)(43)))), ((int)(((byte)(87)))), ((int)(((byte)(154)))))); - // - // layoutControl1 - // - this.layoutControl1.Location = new System.Drawing.Point(0, 0); - this.layoutControl1.Name = "layoutControl1"; - this.layoutControl1.Size = new System.Drawing.Size(200, 200); - this.layoutControl1.TabIndex = 0; - // - // listLog - // - this.listLog.Dock = System.Windows.Forms.DockStyle.Fill; - this.listLog.Location = new System.Drawing.Point(0, 0); - this.listLog.Name = "listLog"; - this.listLog.Size = new System.Drawing.Size(614, 508); - this.listLog.TabIndex = 9; - this.listLog.UseCompatibleStateImageBehavior = false; - this.listLog.View = System.Windows.Forms.View.Details; - this.listLog.SelectedIndexChanged += new System.EventHandler(this.listView1_SelectedIndexChanged); - // - // toolTip1 - // - this.toolTip1.AutomaticDelay = 100; - this.toolTip1.ShowAlways = true; - // - // expandableSplitter2 - // - this.expandableSplitter2.BackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(93)))), ((int)(((byte)(108)))), ((int)(((byte)(122))))); - this.expandableSplitter2.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.expandableSplitter2.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.expandableSplitter2.Dock = System.Windows.Forms.DockStyle.Bottom; - this.expandableSplitter2.ExpandFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(93)))), ((int)(((byte)(108)))), ((int)(((byte)(122))))); - this.expandableSplitter2.ExpandFillColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.expandableSplitter2.ExpandLineColor = System.Drawing.Color.FromArgb(((int)(((byte)(31)))), ((int)(((byte)(57)))), ((int)(((byte)(120))))); - this.expandableSplitter2.ExpandLineColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.ItemText; - this.expandableSplitter2.GripDarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(31)))), ((int)(((byte)(57)))), ((int)(((byte)(120))))); - this.expandableSplitter2.GripDarkColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.ItemText; - this.expandableSplitter2.GripLightColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(232)))), ((int)(((byte)(246))))); - this.expandableSplitter2.GripLightColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; - this.expandableSplitter2.HotBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(246)))), ((int)(((byte)(200)))), ((int)(((byte)(103))))); - this.expandableSplitter2.HotBackColor2 = System.Drawing.Color.FromArgb(((int)(((byte)(254)))), ((int)(((byte)(226)))), ((int)(((byte)(135))))); - this.expandableSplitter2.HotBackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.ItemPressedBackground2; - this.expandableSplitter2.HotBackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.ItemPressedBackground; - this.expandableSplitter2.HotExpandFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(93)))), ((int)(((byte)(108)))), ((int)(((byte)(122))))); - this.expandableSplitter2.HotExpandFillColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.expandableSplitter2.HotExpandLineColor = System.Drawing.Color.FromArgb(((int)(((byte)(31)))), ((int)(((byte)(57)))), ((int)(((byte)(120))))); - this.expandableSplitter2.HotExpandLineColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.ItemText; - this.expandableSplitter2.HotGripDarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(93)))), ((int)(((byte)(108)))), ((int)(((byte)(122))))); - this.expandableSplitter2.HotGripDarkColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.expandableSplitter2.HotGripLightColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(232)))), ((int)(((byte)(246))))); - this.expandableSplitter2.HotGripLightColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground; - this.expandableSplitter2.Location = new System.Drawing.Point(0, 508); - this.expandableSplitter2.Margin = new System.Windows.Forms.Padding(2); - this.expandableSplitter2.Name = "expandableSplitter2"; - this.expandableSplitter2.Size = new System.Drawing.Size(614, 4); - this.expandableSplitter2.Style = DevComponents.DotNetBar.eSplitterStyle.Office2007; - this.expandableSplitter2.TabIndex = 59; - this.expandableSplitter2.TabStop = false; - // - // panelEx1 - // - this.panelEx1.CanvasColor = System.Drawing.SystemColors.Control; - this.panelEx1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.panelEx1.Controls.Add(this.btnStart); - this.panelEx1.Controls.Add(this.btnClose); - this.panelEx1.Controls.Add(this.btnRefresh); - this.panelEx1.Controls.Add(this.btnStop); - this.panelEx1.Controls.Add(this.btnClearLog); - this.panelEx1.Controls.Add(this.btnSetting); - this.panelEx1.DisabledBackColor = System.Drawing.Color.Empty; - this.panelEx1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.panelEx1.Location = new System.Drawing.Point(0, 495); - this.panelEx1.Margin = new System.Windows.Forms.Padding(2); - this.panelEx1.Name = "panelEx1"; - this.panelEx1.Size = new System.Drawing.Size(170, 156); - this.panelEx1.Style.Alignment = System.Drawing.StringAlignment.Center; - this.panelEx1.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.panelEx1.Style.BackColor2.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.panelEx1.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; - this.panelEx1.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.panelEx1.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; - this.panelEx1.Style.GradientAngle = 90; - this.panelEx1.TabIndex = 25; - this.panelEx1.Text = "panelEx1"; - // - // btnStart - // - this.btnStart.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.btnStart.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnStart.Font = new System.Drawing.Font("微软雅黑", 16.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnStart.Location = new System.Drawing.Point(11, 10); - this.btnStart.Margin = new System.Windows.Forms.Padding(2); - this.btnStart.Name = "btnStart"; - this.btnStart.Size = new System.Drawing.Size(150, 45); - this.btnStart.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.btnStart.TabIndex = 0; - this.btnStart.Text = "启动"; - this.btnStart.Click += new System.EventHandler(this.btnStart_Click); - // - // btnClose - // - this.btnClose.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnClose.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; - this.btnClose.Location = new System.Drawing.Point(89, 132); - this.btnClose.Margin = new System.Windows.Forms.Padding(2); - this.btnClose.Name = "btnClose"; - this.btnClose.Size = new System.Drawing.Size(72, 20); - this.btnClose.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.btnClose.TabIndex = 3; - this.btnClose.Text = "退出"; - this.btnClose.Click += new System.EventHandler(this.btnClose_Click); - // - // btnRefresh - // - this.btnRefresh.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.btnRefresh.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnRefresh.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; - this.btnRefresh.Location = new System.Drawing.Point(11, 133); - this.btnRefresh.Margin = new System.Windows.Forms.Padding(2); - this.btnRefresh.Name = "btnRefresh"; - this.btnRefresh.Size = new System.Drawing.Size(72, 20); - this.btnRefresh.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.btnRefresh.TabIndex = 23; - this.btnRefresh.Text = "更新数据"; - this.btnRefresh.Click += new System.EventHandler(this.btnRefresh_Click); - // - // btnStop - // - this.btnStop.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.btnStop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnStop.ColorTable = DevComponents.DotNetBar.eButtonColor.MagentaWithBackground; - this.btnStop.Font = new System.Drawing.Font("微软雅黑", 16.2F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnStop.Location = new System.Drawing.Point(11, 58); - this.btnStop.Margin = new System.Windows.Forms.Padding(2); - this.btnStop.Name = "btnStop"; - this.btnStop.Size = new System.Drawing.Size(150, 45); - this.btnStop.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.btnStop.TabIndex = 1; - this.btnStop.Text = "停止"; - this.btnStop.Click += new System.EventHandler(this.btnStop_Click); - // - // btnClearLog - // - this.btnClearLog.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.btnClearLog.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnClearLog.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; - this.btnClearLog.Location = new System.Drawing.Point(11, 108); - this.btnClearLog.Margin = new System.Windows.Forms.Padding(2); - this.btnClearLog.Name = "btnClearLog"; - this.btnClearLog.Size = new System.Drawing.Size(72, 20); - this.btnClearLog.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.btnClearLog.TabIndex = 10; - this.btnClearLog.Text = "清空日志"; - this.btnClearLog.Click += new System.EventHandler(this.btnClear_Click); - // - // btnSetting - // - this.btnSetting.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.btnSetting.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnSetting.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; - this.btnSetting.Location = new System.Drawing.Point(89, 108); - this.btnSetting.Margin = new System.Windows.Forms.Padding(2); - this.btnSetting.Name = "btnSetting"; - this.btnSetting.Size = new System.Drawing.Size(72, 20); - this.btnSetting.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.btnSetting.TabIndex = 2; - this.btnSetting.Text = "设置"; - this.btnSetting.Click += new System.EventHandler(this.btnSetting_Click); - // - // pnlCtrl - // - this.pnlCtrl.CanvasColor = System.Drawing.SystemColors.Control; - this.pnlCtrl.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.pnlCtrl.Controls.Add(this.panelEx2); - this.pnlCtrl.Controls.Add(this.panelEx1); - this.pnlCtrl.DisabledBackColor = System.Drawing.Color.Empty; - this.pnlCtrl.Dock = System.Windows.Forms.DockStyle.Right; - this.pnlCtrl.Location = new System.Drawing.Point(614, 0); - this.pnlCtrl.Margin = new System.Windows.Forms.Padding(2); - this.pnlCtrl.Name = "pnlCtrl"; - this.pnlCtrl.Size = new System.Drawing.Size(170, 651); - this.pnlCtrl.Style.Alignment = System.Drawing.StringAlignment.Center; - this.pnlCtrl.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.pnlCtrl.Style.BackColor2.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.pnlCtrl.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; - this.pnlCtrl.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.pnlCtrl.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; - this.pnlCtrl.Style.GradientAngle = 90; - this.pnlCtrl.TabIndex = 1; - // - // panelEx2 - // - this.panelEx2.AutoScroll = true; - this.panelEx2.CanvasColor = System.Drawing.SystemColors.Control; - this.panelEx2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.panelEx2.Controls.Add(this.BtnErpPut); - this.panelEx2.Controls.Add(this.BtnErpGet); - this.panelEx2.DisabledBackColor = System.Drawing.Color.Empty; - this.panelEx2.Dock = System.Windows.Forms.DockStyle.Fill; - this.panelEx2.Location = new System.Drawing.Point(0, 0); - this.panelEx2.Margin = new System.Windows.Forms.Padding(2); - this.panelEx2.Name = "panelEx2"; - this.panelEx2.Size = new System.Drawing.Size(170, 495); - this.panelEx2.Style.Alignment = System.Drawing.StringAlignment.Center; - this.panelEx2.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.panelEx2.Style.BackColor2.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.panelEx2.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; - this.panelEx2.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.panelEx2.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; - this.panelEx2.Style.GradientAngle = 90; - this.panelEx2.TabIndex = 29; - // - // BtnErpPut - // - this.BtnErpPut.Count = 0; - this.BtnErpPut.Dock = System.Windows.Forms.DockStyle.Top; - this.BtnErpPut.EnableManual = true; - this.BtnErpPut.InitCount = 0; - this.BtnErpPut.Location = new System.Drawing.Point(0, 50); - this.BtnErpPut.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); - this.BtnErpPut.Name = "BtnErpPut"; - this.BtnErpPut.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2); - this.BtnErpPut.Size = new System.Drawing.Size(170, 50); - this.BtnErpPut.SwitchEnabled = false; - this.BtnErpPut.TabIndex = 40; - this.BtnErpPut.Title = "发送业务数据到ERP"; - this.BtnErpPut.RunOnceExecute += new CktUniApiButton.RunOnceHandler(this.BtnErpPut_RunOnceExecute); - // - // BtnErpGet - // - this.BtnErpGet.Count = 0; - this.BtnErpGet.Dock = System.Windows.Forms.DockStyle.Top; - this.BtnErpGet.EnableManual = true; - this.BtnErpGet.InitCount = 0; - this.BtnErpGet.Location = new System.Drawing.Point(0, 0); - this.BtnErpGet.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); - this.BtnErpGet.Name = "BtnErpGet"; - this.BtnErpGet.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2); - this.BtnErpGet.Size = new System.Drawing.Size(170, 50); - this.BtnErpGet.SwitchEnabled = false; - this.BtnErpGet.TabIndex = 39; - this.BtnErpGet.Title = "从ERP接收基础数据"; - this.BtnErpGet.RunOnceExecute += new CktUniApiButton.RunOnceHandler(this.BtnErpGet_RunOnceExecute); - // - // bar1 - // - this.bar1.AntiAlias = true; - this.bar1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.bar1.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); - this.bar1.IsMaximized = false; - this.bar1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { - this.labelItem1, - this.txtDomain, - this.labelItem2, - this.txtSite, - this.labelItem4, - this.txtVersion}); - this.bar1.Location = new System.Drawing.Point(0, 651); - this.bar1.Margin = new System.Windows.Forms.Padding(2); - this.bar1.Name = "bar1"; - this.bar1.Size = new System.Drawing.Size(784, 24); - this.bar1.Stretch = true; - this.bar1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.bar1.TabIndex = 87; - this.bar1.TabStop = false; - this.bar1.Text = "bar1"; - // - // labelItem1 - // - this.labelItem1.Name = "labelItem1"; - this.labelItem1.Text = "QAD域"; - // - // txtDomain - // - this.txtDomain.Name = "txtDomain"; - this.txtDomain.TextBoxWidth = 80; - this.txtDomain.WatermarkColor = System.Drawing.SystemColors.GrayText; - // - // labelItem2 - // - this.labelItem2.Name = "labelItem2"; - this.labelItem2.Text = "QAD地点"; - // - // txtSite - // - this.txtSite.Name = "txtSite"; - this.txtSite.TextBoxWidth = 80; - this.txtSite.WatermarkColor = System.Drawing.SystemColors.GrayText; - // - // labelItem4 - // - this.labelItem4.ItemAlignment = DevComponents.DotNetBar.eItemAlignment.Far; - this.labelItem4.Name = "labelItem4"; - this.labelItem4.Text = "版本"; - // - // txtVersion - // - this.txtVersion.Name = "txtVersion"; - this.txtVersion.TextBoxWidth = 200; - this.txtVersion.WatermarkColor = System.Drawing.SystemColors.GrayText; - // - // FormMain - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(784, 675); - this.Controls.Add(this.listLog); - this.Controls.Add(this.expandableSplitter2); - this.Controls.Add(this.txtLog); - this.Controls.Add(this.pnlCtrl); - this.Controls.Add(this.bar1); - this.DoubleBuffered = true; - this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.Margin = new System.Windows.Forms.Padding(2); - this.MinimumSize = new System.Drawing.Size(800, 596); - this.Name = "FormMain"; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "通用接口自动处理程序"; - this.Load += new System.EventHandler(this.FormMain_Load); - this.panelEx1.ResumeLayout(false); - this.pnlCtrl.ResumeLayout(false); - this.panelEx2.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.bar1)).EndInit(); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - private System.Windows.Forms.TextBox txtLog; - private DevComponents.DotNetBar.StyleManager styleManager1; - private DevComponents.DotNetBar.Layout.LayoutControl layoutControl1; - private System.Windows.Forms.ListView listLog; - private System.Windows.Forms.ToolTip toolTip1; - private DevComponents.DotNetBar.ExpandableSplitter expandableSplitter2; - private DevComponents.DotNetBar.PanelEx panelEx1; - private DevComponents.DotNetBar.ButtonX btnStart; - private DevComponents.DotNetBar.ButtonX btnClose; - private DevComponents.DotNetBar.ButtonX btnRefresh; - private DevComponents.DotNetBar.ButtonX btnStop; - private DevComponents.DotNetBar.ButtonX btnClearLog; - private DevComponents.DotNetBar.ButtonX btnSetting; - private DevComponents.DotNetBar.PanelEx pnlCtrl; - private DevComponents.DotNetBar.PanelEx panelEx2; - private CktUniApiButton BtnErpPut; - private CktUniApiButton BtnErpGet; - private DevComponents.DotNetBar.Bar bar1; - private DevComponents.DotNetBar.LabelItem labelItem1; - private DevComponents.DotNetBar.TextBoxItem txtDomain; - private DevComponents.DotNetBar.LabelItem labelItem2; - private DevComponents.DotNetBar.TextBoxItem txtSite; - private DevComponents.DotNetBar.LabelItem labelItem4; - private DevComponents.DotNetBar.TextBoxItem txtVersion; - } -} - diff --git a/CK.SCP.UniApi_CQ/FormMain.cs b/CK.SCP.UniApi_CQ/FormMain.cs deleted file mode 100644 index 3a976d8..0000000 --- a/CK.SCP.UniApi_CQ/FormMain.cs +++ /dev/null @@ -1,202 +0,0 @@ -using System; -using System.IO; -using System.Reflection; -using System.Windows.Forms; -using CK.SCP.Models; -using CK.SCP.Models.Enums; -using CK.SCP.Utils; -using DevComponents.DotNetBar; - -namespace CK.SCP.GrupUniApi -{ - public partial class FormMain : Office2007Form - { - - private Timer _timer; - private IApi _iApi; - - public FormMain() - { - InitializeComponent(); - - // StringRedir r = new StringRedir(ref textBox1); - StringRedir r = new StringRedir(ref listLog, true); - Console.SetOut(r); - try - { - Init(); - } - catch (Exception ex) - { - Console.WriteLine(ex.Message); - } - - } - - private static void InitGlobalCache() - { - var db = EntitiesFactory.CreateScpInstance(); - ScpCache.Refresh(db); - } - - - - private void Init() - { - // txtDomain.Text = ScpCache.Config.QAD域; - // txtSite.Text = ScpCache.Config.QAD地点; - // var sofewareName = $"{FileHelper.GetApplicationPath()}/{Application.ProductName}.exe"; - // var fi = new FileInfo(sofewareName); - // txtVersion.Text = $@"Version {Assembly.LoadFrom(sofewareName).GetName().Version}{fi.LastWriteTime:(MMddHHmm)}"; - ProjectName projectName; - Enum.TryParse(ScpCache.Config.项目名称, true, out projectName); - - switch (projectName) - { - case ProjectName.锦州锦恒: - _iApi = new QadOdbcApi(); - break; - default: - throw new ArgumentOutOfRangeException(); - } -// BtnErpGet.Visible = false; -// BtnErpPut.Visible = false; - BtnErpGet.Count = GlobalVar.DurationConfig.ERP接口接收; - BtnErpPut.Count = GlobalVar.DurationConfig.ERP接口发送; - - BtnErpGet.InitCount = GlobalVar.DurationConfig.ERP接口接收; - BtnErpPut.InitCount = GlobalVar.DurationConfig.ERP接口发送; - - - _timer = new Timer { Interval = 1000 }; - _timer.Tick += _timer_Tick; - btnStart.Enabled = true; - btnStop.Enabled = false; - - } - - - private int _refreshInterval = 10 * 60; - private void _timer_Tick(object sender, EventArgs e) - { - BtnErpGet.RunOnce(); - BtnErpPut.RunOnce(); - RefreshGlobalCache(); - } - - private void RefreshGlobalCache() - { - if (_refreshInterval > 0) - { - _refreshInterval--; - } - else - { - InitGlobalCache(); - _refreshInterval = 10 * 60; - Console.WriteLine("开始更新缓存数据!"); - } - } - - private void FormMain_Load(object sender, EventArgs e) - { - try - { - InitGlobalCache(); - } - catch (Exception ex) - { - Console.WriteLine(ex); - - } - } - - private void listView1_SelectedIndexChanged(object sender, EventArgs e) - { - if (listLog.SelectedItems.Count == 0) return; - var str = listLog.SelectedItems[0].SubItems[1].Text; - txtLog.Text = str; - } - - - #region Button - - private void btnClose_Click(object sender, EventArgs e) - { - Close(); - } - - private void btnStart_Click(object sender, EventArgs e) - { - Console.WriteLine(@"系统启动"); - BtnErpGet.Start(); - BtnErpPut.Start(); - - _timer.Start(); - btnStart.Enabled = false; - btnStop.Enabled = true; - - } - - private void btnStop_Click(object sender, EventArgs e) - { - BtnErpGet.Stop(); - BtnErpPut.Stop(); - - _timer.Stop(); - btnStart.Enabled = true; - btnStop.Enabled = false; - - Console.WriteLine(@"系统停止"); - } - - private void btnRefresh_Click(object sender, EventArgs e) - { - try - { - InitGlobalCache(); - } - catch (Exception ex) - { - Console.WriteLine(ex); - - } - } - - private void btnClear_Click(object sender, EventArgs e) - { - listLog.Items.Clear(); - } - - private void btnSetting_Click(object sender, EventArgs e) - { - try - { - var form = new PopupSetting(); - var dr = form.ShowDialog(this); - if (dr != DialogResult.OK) return; - Init(); - } - catch (Exception ex) - { - Console.WriteLine(ex); - - } - } - - #endregion - - - - private void BtnErpGet_RunOnceExecute() - { - _iApi.Get(); - } - - private void BtnErpPut_RunOnceExecute() - { - _iApi.Put(); - } - - } -} diff --git a/CK.SCP.UniApi_CQ/FormMain.resx b/CK.SCP.UniApi_CQ/FormMain.resx deleted file mode 100644 index 2dcb073..0000000 --- a/CK.SCP.UniApi_CQ/FormMain.resx +++ /dev/null @@ -1,151 +0,0 @@ -<?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> - <metadata name="styleManager1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>17, 17</value> - </metadata> - <metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>156, 17</value> - </metadata> - <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> - <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value> - AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAQAQAAAAAAAAAAAAAAAAAAAAA - AAAzMzNAJSUl8BYWFv8HBwf/CAgI/xkZGf8pKSn/Ojo6/0pKSv9bW1v/a2tr/3x8fP+MjIz/lpaW/4uL - i/CAgIBAQUFB8CkpKf8YGBj/FhYW/xUVFf9wVCX///hs////hf///3r/6r5J/xgNDP8JCQn/CAgI/wYG - Bv9fX1//i4uL8FBQUP8cHBz/Gxsb/xkZGf8XFxf/UDwg//ztZP///3////9w/9qkP/8QDQ3/DAwM/wsL - C/8JCQn/BwcH/5aWlv9eXl7/Hx8f/x4eHv8cHBz/Ghoa/xkZGf+GaS7/0rBG/6h5Lv9RMRn/JBgR/xAO - Dv8ODg7/DAwM/woKCv+MjIz/bW1t/yIiIv8hISH/Hx8f/x0dHf8cHBz/Ghoa/0cnGf9eNBb/kl8l/92Z - O//BeS//bUYf/xcTEP8NDQ3/fHx8/3x8fP8lJSX/IyMj/yIiIv8gICD/Hx8f/0MtHv/yrUP/kG8p/2hD - Gf//8Fz//+hZ/65vK/9PLBH/l2En/2tra/+JiYn/KCgo/yYmJv8lJSX/IyMj/yMhIf/Ghzb///Ze/+To - Yf+KWyT/8sBK/7uINP9EJw3/sXQs/8aHM/9bW1v/mJiY/ysrK/8pKSn/KCgo/yYmJv89LCT/9MJK//// - cf/p4mb/mWoq/+u0RP/irEb/2NNY///cVP/JgDH/S0tL/4uLi/8uLi7/LCws/ysrK/8pKSn/QzAm///d - Vf+jnUH/YDUU/2ZQIv84Ggr/0qZH////eP//41f/v3gv/zs7O/99fX3/MTEx/y8vL/8sLCz/KSkp/yoq - Kv/nuEj/fXQt/3FfJv/pqEX/vZg//0UiDP/l4Fv//9pT/2tEI/8rKyv/bm5u/zMzM/9lSC7/u4Y1/7N4 - L/9GLx//ZUks///9Zf+CfTP/OxAE/5tzLv9lYin/1cBJ/9+jQf8eHh7/Ghoa/19fX/91UjH/9dFS//// - bP//+2T/2Js7/zMjIP+DZTb/5cRM/5iINP/XzFH///Bi/8yYP/86KyP/RS8f/woKCv9QUFD/7K5C//// - cP///4P///97///kWP96Tyr/MDAw/0Q3L/99cDz/jHA5/15FLP8oKCj/KSMj/92oQP8GBgb/QUFB/4hr - Of/+8mn///+C////ef/zz1H/VD8v/zMzM/8xMTH/MDAw/y4uLv8sLCz/Kysr/0EvJv/431n/FBQU/zMz - M/A8PDz/dGQ8/8azUv/Ap0v/aFE1/zMzM/8zMzP/MzMz/zMzM/8xMTH/Ly8v/y4uLv8sLCz/q5BD/yMj - I/AzMzNAMzMz8EJCQv9RUVH/X19f/25ubv99fX3/jIyM/5eXl/+JiYn/enp6/2tra/9dXV3/T09P/0BA - QPAxMTFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAA== -</value> - </data> -</root> \ No newline at end of file diff --git a/CK.SCP.UniApi_CQ/GlobalVar.cs b/CK.SCP.UniApi_CQ/GlobalVar.cs deleted file mode 100644 index 309e3dc..0000000 --- a/CK.SCP.UniApi_CQ/GlobalVar.cs +++ /dev/null @@ -1,28 +0,0 @@ -using CK.SCP.Models; -using CK.SCP.GrupUniApi.Config; - -namespace CK.SCP.GrupUniApi -{ - public class GlobalVar - { - - private static UniApiConfig _apiConfig; - private static DurationConfig _durationConfig; - - public static UniApiConfig ApiConfig - { - get { return _apiConfig ?? (_apiConfig = GlobalConfig.GetConfigValues<UniApiConfig>(GlobalConfig.UniApiConfigFileName)); } - set { _apiConfig = value; } - } - - public static DurationConfig DurationConfig - { - get { return _durationConfig ?? (_durationConfig = GlobalConfig.GetConfigValues<DurationConfig>(GlobalConfig.DurationFileName)); } - set { _durationConfig = value; } - } - - public static string SuperPassword { get; set; } = "changketec2018"; - - - } -} \ No newline at end of file diff --git a/CK.SCP.UniApi_CQ/IApi.cs b/CK.SCP.UniApi_CQ/IApi.cs deleted file mode 100644 index 3816f31..0000000 --- a/CK.SCP.UniApi_CQ/IApi.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace CK.SCP.GrupUniApi -{ - public interface IApi - { - - void Get(); - void Put(); - } -} \ No newline at end of file diff --git a/CK.SCP.UniApi_CQ/PopupSetting.Designer.cs b/CK.SCP.UniApi_CQ/PopupSetting.Designer.cs deleted file mode 100644 index a567f91..0000000 --- a/CK.SCP.UniApi_CQ/PopupSetting.Designer.cs +++ /dev/null @@ -1,196 +0,0 @@ -using CK.SCP.Common; - -namespace CK.SCP.GrupUniApi -{ - partial class PopupSetting - { - /// <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.btnCancel = new DevComponents.DotNetBar.ButtonX(); - this.btnSave = new DevComponents.DotNetBar.ButtonX(); - this.panelEx2 = new DevComponents.DotNetBar.PanelEx(); - this.txtSuperPassword = new CktTextBox(); - this.pnlMain = new DevComponents.DotNetBar.PanelEx(); - this.listSetting = new DevComponents.DotNetBar.ListBoxAdv(); - this.panelEx2.SuspendLayout(); - this.SuspendLayout(); - // - // btnCancel - // - this.btnCancel.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.btnCancel.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; - this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.btnCancel.Location = new System.Drawing.Point(9, 8); - this.btnCancel.Margin = new System.Windows.Forms.Padding(2); - this.btnCancel.Name = "btnCancel"; - this.btnCancel.Size = new System.Drawing.Size(56, 24); - this.btnCancel.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.btnCancel.TabIndex = 2; - this.btnCancel.Text = "关闭"; - this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); - // - // btnSave - // - this.btnSave.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnSave.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; - this.btnSave.Location = new System.Drawing.Point(399, 8); - this.btnSave.Margin = new System.Windows.Forms.Padding(2); - this.btnSave.Name = "btnSave"; - this.btnSave.Size = new System.Drawing.Size(56, 24); - this.btnSave.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.btnSave.TabIndex = 1; - this.btnSave.Text = "保存"; - this.btnSave.Click += new System.EventHandler(this.btnSave_Click); - // - // panelEx2 - // - this.panelEx2.CanvasColor = System.Drawing.SystemColors.Control; - this.panelEx2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.panelEx2.Controls.Add(this.txtSuperPassword); - this.panelEx2.Controls.Add(this.btnCancel); - this.panelEx2.Controls.Add(this.btnSave); - this.panelEx2.DisabledBackColor = System.Drawing.Color.Empty; - this.panelEx2.Dock = System.Windows.Forms.DockStyle.Bottom; - this.panelEx2.Location = new System.Drawing.Point(0, 401); - this.panelEx2.Margin = new System.Windows.Forms.Padding(2); - this.panelEx2.Name = "panelEx2"; - this.panelEx2.Size = new System.Drawing.Size(465, 41); - this.panelEx2.Style.Alignment = System.Drawing.StringAlignment.Center; - this.panelEx2.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.panelEx2.Style.BackColor2.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.panelEx2.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; - this.panelEx2.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.panelEx2.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; - this.panelEx2.Style.GradientAngle = 90; - this.panelEx2.TabIndex = 32; - // - // txtSuperPassword - // - this.txtSuperPassword.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.txtSuperPassword.BackColor = System.Drawing.Color.Transparent; - this.txtSuperPassword.BoxWidth = 0; - this.txtSuperPassword.ButtonText = "..."; - this.txtSuperPassword.ButtonVisible = false; - this.txtSuperPassword.DecimalValue = new decimal(new int[] { - 0, - 0, - 0, - 0}); - this.txtSuperPassword.IntValue = 0; - this.txtSuperPassword.IsNum = false; - this.txtSuperPassword.LblText = "管理员密码"; - this.txtSuperPassword.LblTextAlign = System.Drawing.StringAlignment.Far; - this.txtSuperPassword.LblWidth = 80; - this.txtSuperPassword.Location = new System.Drawing.Point(172, 8); - this.txtSuperPassword.Margin = new System.Windows.Forms.Padding(2); - this.txtSuperPassword.Multiline = false; - this.txtSuperPassword.Name = "txtSuperPassword"; - this.txtSuperPassword.ReadOnly = false; - this.txtSuperPassword.RearLblText = ""; - this.txtSuperPassword.RearLblWidth = 40; - this.txtSuperPassword.Size = new System.Drawing.Size(223, 24); - this.txtSuperPassword.TabIndex = 0; - this.txtSuperPassword.UserSystemPasswordChar = true; - this.txtSuperPassword.Value = ""; - // - // pnlMain - // - this.pnlMain.AutoScroll = true; - this.pnlMain.CanvasColor = System.Drawing.SystemColors.Control; - this.pnlMain.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; - this.pnlMain.DisabledBackColor = System.Drawing.Color.Empty; - this.pnlMain.Dock = System.Windows.Forms.DockStyle.Fill; - this.pnlMain.Location = new System.Drawing.Point(150, 0); - this.pnlMain.Name = "pnlMain"; - this.pnlMain.Size = new System.Drawing.Size(315, 401); - this.pnlMain.Style.Alignment = System.Drawing.StringAlignment.Center; - this.pnlMain.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.pnlMain.Style.BackColor2.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.pnlMain.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; - this.pnlMain.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.pnlMain.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; - this.pnlMain.Style.GradientAngle = 90; - this.pnlMain.TabIndex = 34; - // - // listSetting - // - this.listSetting.AutoScroll = true; - // - // - // - this.listSetting.BackgroundStyle.Class = "ListBoxAdv"; - this.listSetting.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.listSetting.CheckStateMember = null; - this.listSetting.ContainerControlProcessDialogKey = true; - this.listSetting.Dock = System.Windows.Forms.DockStyle.Left; - this.listSetting.DragDropSupport = true; - this.listSetting.Location = new System.Drawing.Point(0, 0); - this.listSetting.Name = "listSetting"; - this.listSetting.Size = new System.Drawing.Size(150, 401); - this.listSetting.TabIndex = 33; - this.listSetting.Text = "listBoxAdv1"; - this.listSetting.SelectedIndexChanged += new System.EventHandler(this.listSetting_SelectedIndexChanged); - this.listSetting.ItemClick += new System.EventHandler(this.listSetting_ItemClick); - // - // PopupSetting - // - this.AcceptButton = this.btnSave; - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.CancelButton = this.btnCancel; - this.ClientSize = new System.Drawing.Size(465, 442); - this.Controls.Add(this.pnlMain); - this.Controls.Add(this.listSetting); - this.Controls.Add(this.panelEx2); - this.DoubleBuffered = true; - this.Margin = new System.Windows.Forms.Padding(2); - this.Name = "PopupSetting"; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; - this.Text = "系统设置"; - this.Load += new System.EventHandler(this.FormSetting_Load); - this.panelEx2.ResumeLayout(false); - this.ResumeLayout(false); - - } - - #endregion - - public PopupSetting() - { - InitializeComponent(); - } - - private DevComponents.DotNetBar.ButtonX btnCancel; - private DevComponents.DotNetBar.ButtonX btnSave; - private DevComponents.DotNetBar.PanelEx panelEx2; - private CktTextBox txtSuperPassword; - private DevComponents.DotNetBar.PanelEx pnlMain; - private DevComponents.DotNetBar.ListBoxAdv listSetting; - } -} \ No newline at end of file diff --git a/CK.SCP.UniApi_CQ/PopupSetting.cs b/CK.SCP.UniApi_CQ/PopupSetting.cs deleted file mode 100644 index 005ea93..0000000 --- a/CK.SCP.UniApi_CQ/PopupSetting.cs +++ /dev/null @@ -1,107 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Windows.Forms; -using CK.SCP.Models; -using CK.SCP.Models.Enums; -using CK.SCP.GrupUniApi.Config; -using CK.SCP.Utils; -using CK.SCP.Common; -using DevComponents.DotNetBar; -using DevComponents.DotNetBar.Controls; - - -namespace CK.SCP.GrupUniApi -{ - public partial class PopupSetting : Office2007Form - { - - private List<GroupPanel> _groupList = new List<GroupPanel>(); - - private void FormSetting_Load(object sender, EventArgs e) - { - ProjectName projectName; -// GetConfig<CommonConfig>(GlobalConfig.CommonFileName); - GetConfig<DbSetting>(GlobalConfig.ScpDbFileName); - GetConfig<UniApiConfig>(GlobalConfig.UniApiConfigFileName); - GetConfig<DurationConfig>(GlobalConfig.DurationFileName); - - Enum.TryParse(ScpCache.Config.项目名称, true, out projectName); - - - - switch (projectName) - { - - case ProjectName.锦州锦恒: - GetConfig<DbSetting>(GlobalConfig.UniApiDbFileName); - break; - } - listSetting.SelectedIndex = 0; - - } - private void GetConfig<T>(string filename) where T : new() - { - var group = SettingHelper.GetConfigValues<T>(filename); - pnlMain.Controls.Add(@group); - pnlMain.ResumeLayout(); - _groupList.Add(@group); - listSetting.Items.Add(SettingHelper.GetPureName(filename)); - } - - private void btnSave_Click(object sender, EventArgs e) - { - - try - { - if (string.IsNullOrEmpty(txtSuperPassword.Text)) - throw new Exception("请输入管理员密码!"); - if (txtSuperPassword.Text != GlobalVar.SuperPassword) - throw new Exception("管理员密码密码错误,请重新输入!"); - ProjectName projectName; - Enum.TryParse(ScpCache.Config.项目名称, true, out projectName); -// GlobalVar.CommonConfig = SettingHelper.SetConfigValues<CommonConfig>(_groupList, GlobalConfig.CommonFileName); - GlobalConfig.ScpDatabase = SettingHelper.SetConfigValues<DbSetting>(_groupList, GlobalConfig.ScpDbFileName); - GlobalVar.ApiConfig = SettingHelper.SetConfigValues<UniApiConfig>(_groupList, GlobalConfig.UniApiConfigFileName); - GlobalVar.DurationConfig = SettingHelper.SetConfigValues<DurationConfig>(_groupList, GlobalConfig.DurationFileName); - switch (projectName) - { - case ProjectName.锦州锦恒: - GlobalConfig.UniApiDatabase = SettingHelper.SetConfigValues<DbSetting>(_groupList, GlobalConfig.UniApiDbFileName); - break; - } - - DialogResult = DialogResult.OK; - Close(); - } - catch (Exception ex) - { - MessageHelper.ShowError(ex); - txtSuperPassword.Focus(); - } - } - - private void btnCancel_Click(object sender, EventArgs e) - { - Close(); - } - - private void listSetting_ItemClick(object sender, EventArgs e) - { - - } - - private void listSetting_SelectedIndexChanged(object sender, EventArgs e) - { - if (listSetting.SelectedIndex < 0) return; - var selectedName = listSetting.SelectedItem.ToString(); - var group = _groupList.SingleOrDefault(p => p.Name == selectedName); - if (group == null) return; - foreach (var groupPanel in _groupList) - { - groupPanel.Visible = false; - } - group.Visible = true; - } - } -} diff --git a/CK.SCP.UniApi_CQ/PopupSetting.resx b/CK.SCP.UniApi_CQ/PopupSetting.resx deleted file mode 100644 index 1af7de1..0000000 --- a/CK.SCP.UniApi_CQ/PopupSetting.resx +++ /dev/null @@ -1,120 +0,0 @@ -<?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> \ No newline at end of file diff --git a/CK.SCP.UniApi_CQ/Program.cs b/CK.SCP.UniApi_CQ/Program.cs deleted file mode 100644 index 49bd420..0000000 --- a/CK.SCP.UniApi_CQ/Program.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Windows.Forms; - -namespace CK.SCP.GrupUniApi -{ - static class Program - { - /// <summary> - /// 应用程序的主入口点。 - /// </summary> - [STAThread] - static void Main() - { - Application.EnableVisualStyles(); - Application.SetCompatibleTextRenderingDefault(false); - Application.Run(new FormMain()); - } - } -} diff --git a/CK.SCP.UniApi_CQ/Properties/AssemblyInfo.cs b/CK.SCP.UniApi_CQ/Properties/AssemblyInfo.cs deleted file mode 100644 index 28dfa51..0000000 --- a/CK.SCP.UniApi_CQ/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// 有关程序集的一般信息由以下 -// 控制。更改这些特性值可修改 -// 与程序集关联的信息。 -[assembly: AssemblyTitle("UniApi")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("UniApi")] -[assembly: AssemblyCopyright("Copyright © 2017")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// 将 ComVisible 设置为 false 会使此程序集中的类型 -//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 -//请将此类型的 ComVisible 特性设置为 true。 -[assembly: ComVisible(false)] - -// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID -[assembly: Guid("b870b746-d647-4b84-8f84-6281d3a55fcb")] - -// 程序集的版本信息由下列四个值组成: -// -// 主版本 -// 次版本 -// 生成号 -// 修订号 -// -// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号 -// 方法是按如下所示使用“*”: : -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/CK.SCP.UniApi_CQ/Properties/Resources.Designer.cs b/CK.SCP.UniApi_CQ/Properties/Resources.Designer.cs deleted file mode 100644 index d3fedfd..0000000 --- a/CK.SCP.UniApi_CQ/Properties/Resources.Designer.cs +++ /dev/null @@ -1,63 +0,0 @@ -//------------------------------------------------------------------------------ -// <auto-generated> -// 此代码由工具生成。 -// 运行时版本:4.0.30319.42000 -// -// 对此文件的更改可能会导致不正确的行为,并且如果 -// 重新生成代码,这些更改将会丢失。 -// </auto-generated> -//------------------------------------------------------------------------------ - -namespace CK.SCP.GrupUniApi.Properties { - using System; - - - /// <summary> - /// 一个强类型的资源类,用于查找本地化的字符串等。 - /// </summary> - // 此类是由 StronglyTypedResourceBuilder - // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 - // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen - // (以 /str 作为命令选项),或重新生成 VS 项目。 - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - /// <summary> - /// 返回此类使用的缓存的 ResourceManager 实例。 - /// </summary> - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CK.SCP.GrupUniApi.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// <summary> - /// 使用此强类型资源类,为所有资源查找 - /// 重写当前线程的 CurrentUICulture 属性。 - /// </summary> - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - } -} diff --git a/CK.SCP.UniApi_CQ/Properties/Resources.resx b/CK.SCP.UniApi_CQ/Properties/Resources.resx deleted file mode 100644 index af7dbeb..0000000 --- a/CK.SCP.UniApi_CQ/Properties/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ -<?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.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: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" type="xsd:string" /> - <xsd:attribute name="type" type="xsd:string" /> - <xsd:attribute name="mimetype" type="xsd:string" /> - </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" msdata:Ordinal="1" /> - <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> - <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> - </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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <resheader name="writer"> - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> -</root> \ No newline at end of file diff --git a/CK.SCP.UniApi_CQ/Properties/Settings.Designer.cs b/CK.SCP.UniApi_CQ/Properties/Settings.Designer.cs deleted file mode 100644 index 78d316e..0000000 --- a/CK.SCP.UniApi_CQ/Properties/Settings.Designer.cs +++ /dev/null @@ -1,26 +0,0 @@ -//------------------------------------------------------------------------------ -// <auto-generated> -// 此代码由工具生成。 -// 运行时版本:4.0.30319.42000 -// -// 对此文件的更改可能会导致不正确的行为,并且如果 -// 重新生成代码,这些更改将会丢失。 -// </auto-generated> -//------------------------------------------------------------------------------ - -namespace CK.SCP.GrupUniApi.Properties { - - - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { - - private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default { - get { - return defaultInstance; - } - } - } -} diff --git a/CK.SCP.UniApi_CQ/Properties/Settings.settings b/CK.SCP.UniApi_CQ/Properties/Settings.settings deleted file mode 100644 index 3964565..0000000 --- a/CK.SCP.UniApi_CQ/Properties/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version='1.0' encoding='utf-8'?> -<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)"> - <Profiles> - <Profile Name="(Default)" /> - </Profiles> - <Settings /> -</SettingsFile> diff --git a/CK.SCP.UniApi_CQ/QadOdbcApi.cs b/CK.SCP.UniApi_CQ/QadOdbcApi.cs deleted file mode 100644 index 9a7a446..0000000 --- a/CK.SCP.UniApi_CQ/QadOdbcApi.cs +++ /dev/null @@ -1,117 +0,0 @@ -using System; -using System.ComponentModel; -using System.Linq; -using CK.SCP.Models; -using CK.SCP.Models.Enums; -using CK.SCP.Models.UniApiEntity; -using CK.SCP.GrupUniApi.Controller; -using System.Transactions; -namespace CK.SCP.GrupUniApi -{ - public class QadOdbcApi : IApi - { - private readonly BackgroundWorker _bgwGet = new BackgroundWorker(); - private readonly BackgroundWorker _bgwPut = new BackgroundWorker(); - - public QadOdbcApi() - { - InitBgw(); - } - - private void InitBgw() - { - _bgwGet.DoWork += BgwGetDoWork; - _bgwGet.RunWorkerCompleted += BgwGetRunWorkerCompleted; - //回传给QAD - _bgwPut.DoWork += BgwPutDoWork; - _bgwPut.RunWorkerCompleted += BgwPutRunWorkerCompleted; - - } - - private void BgwPutRunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) - { - Console.WriteLine(@"Odbc接口数据发送完成<<<<<<<<<<"); - } - - private void BgwPutDoWork(object sender, DoWorkEventArgs e) - { - var idb = EntitiesFactory.CreateUniApiInstance(); - var wdb = EntitiesFactory.CreateScpInstance(); - try - { - var apiList = UniApiController.GetNewInterfaceList(wdb); - OdbcApiScpController.PutAll(wdb, idb, apiList); - apiList = apiList.Where(p => p.State == (int)FormState.关闭).ToList(); - var apiHisList = apiList.Select(uniApi => uniApi.ToHis()).ToList(); - using (var scope = - new TransactionScope(TransactionScopeOption.Required, new TransactionOptions() - { - IsolationLevel = System.Transactions.IsolationLevel.Serializable, - Timeout = new TimeSpan(0, 20, 0) - })) - { - UniApiController.AddHisList(wdb, apiHisList); - UniApiController.RemoveList(wdb, apiList); - EntitiesFactory.SaveDb(idb); - EntitiesFactory.SaveDb(wdb); - scope.Complete(); - } - } - - - catch (Exception ex) - { - Console.WriteLine(ex); - } - - } - - private void BgwGetRunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) - { - Console.WriteLine(@"Odbc接口数据接收完成<<<<<<<<<<"); - } - - private void BgwGetDoWork(object sender, DoWorkEventArgs e) - { - try - { - OdbcApiQadController.GetNewCtrlList(); //取QAD数据 - OdbcApiWmsController.GetNewCtrlList(); //取WMS数据 - } - catch (Exception ex) - { - Console.WriteLine(string.Format("错误:{0}", ex.Message)); - // MessageHelper.ShowError(ex); - } - } - - public void Get() - { - try - { - if (_bgwGet.IsBusy) return; - Console.WriteLine(@"Odbc接口数据接收开始>>>>>>>>>>"); - _bgwGet.RunWorkerAsync(); - } - catch (ScpException ex) - { - Console.WriteLine(ex); - } - } - - public void Put() - { - try - { - if (_bgwPut.IsBusy) return; - Console.WriteLine(@"Odbc接口数据发送开始>>>>>>>>>>"); - _bgwPut.RunWorkerAsync(); - } - catch (ScpException ex) - { - Console.WriteLine(ex); - } - } - } - -} \ No newline at end of file diff --git a/CK.SCP.UniApi_CQ/Scp数据库设置.ini b/CK.SCP.UniApi_CQ/Scp数据库设置.ini deleted file mode 100644 index ce4d0dc..0000000 Binary files a/CK.SCP.UniApi_CQ/Scp数据库设置.ini and /dev/null differ diff --git a/CK.SCP.UniApi_CQ/StringRedir.cs b/CK.SCP.UniApi_CQ/StringRedir.cs deleted file mode 100644 index c4431f1..0000000 --- a/CK.SCP.UniApi_CQ/StringRedir.cs +++ /dev/null @@ -1,96 +0,0 @@ -using System; -using System.IO; -using System.Windows.Forms; -using CK.SCP.Utils; -using DevComponents.DotNetBar.Controls; - -namespace CK.SCP.GrupUniApi -{ - public class StringRedir : StringWriter - { -// private readonly TextBoxX _textboxX; - private readonly TextBox _textbox; - private ListView _listView; - private bool _isShowList = true; - - - public StringRedir(ref TextBoxX textBox) - { - _textbox = textBox; - } - - public StringRedir(ref TextBox textBox) - { - _textbox = textBox; - } - - public StringRedir(ref ListView listView,bool isShowList) - { - _isShowList = isShowList; - _listView = listView; - _listView.View = View.Details; - _listView.GridLines = true; - var colTime = new ColumnHeader {Text = "时间",Width = 180}; - var colMessage = new ColumnHeader {Text = "内容",Width = 1000}; - _listView.Columns.Add(colTime); - _listView.Columns.Add(colMessage); - } - - - delegate void WriteLineCallBack(string text); - -// public override void WriteLine(string value) -// { -// if (_textbox.InvokeRequired) -// { -// WriteLineCallBack writeLineCallBack = WriteLine; -// _textbox.Invoke(writeLineCallBack, value); -// } -// else -// { -// if (_textbox.Lines.Length > 1000) -// _textbox.Text = string.Empty; -// _textbox.AppendText(DateTime.Now + "\t" + value + Environment.NewLine); -// _textbox.ScrollToCaret(); -// } -// -// LogHelper.Write(value); -// } - - public override void WriteLine(string value) - { - - if (_listView.InvokeRequired) - { - WriteLineCallBack writeLineCallBack = WriteLine; - if (_listView == null || _listView.IsDisposed) - { - _listView = new ListView(); - return; - } - _listView.BeginInvoke(writeLineCallBack, value); - } - else - { -// if (_isShowList) - { - if (_listView.Items.Count > 2000) - { - _listView.Items.Clear(); - } - var item = new ListViewItem {Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss fff")}; - item.SubItems.Add(value); - _listView.Items.Add(item); - - item.EnsureVisible(); - } - // _textbox.AppendText(DateTime.Now + "\t" + value + Environment.NewLine); - // _textbox.ScrollToCaret(); - LogHelper.Write(value); - } - - } - - - } -} \ No newline at end of file diff --git a/CK.SCP.UniApi_CQ/UniApiController.cs b/CK.SCP.UniApi_CQ/UniApiController.cs deleted file mode 100644 index 063727d..0000000 --- a/CK.SCP.UniApi_CQ/UniApiController.cs +++ /dev/null @@ -1,219 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using CK.SCP.Models; -using CK.SCP.Models.Enums; -using CK.SCP.Models.ScpEntity; -using CK.SCP.Models.UniApiEntity; - -namespace CK.SCP.GrupUniApi -{ - public static class UniApiController - { - - public static void RemoveList(ScpEntities db, List<TS_UNI_API> uniApiList) - { - db.TS_UNI_API.RemoveRange(uniApiList); - } - public static void AddHisList(ScpEntities db, List<TS_UNI_API_HIS> uniApiHisList) - { - - db.TS_UNI_API_HIS.AddRange(uniApiHisList); - } - - public static void AddApiData(ScpEntities wdb, TS_UNI_API apiData) - { - wdb.TS_UNI_API.Add(apiData); - } - - - public static void AddApiDataList(ScpEntities wdb, List<TS_UNI_API> apiDataList) - { - wdb.TS_UNI_API.AddRange(apiDataList); - } - - - public static WmsTableName GetTableName(UniApiType uniApiType) - { - WmsTableName tableName; - switch (uniApiType) - { -// case UniApiType.StockMove: -// tableName = WmsTableName.xxwms_tr_det; -// break; -// case UniApiType.BackFlush: -// tableName = WmsTableName.xxwms_bk_mstr; -// break; -// case UniApiType.MaterialReceive: -// tableName = WmsTableName.xxwms_rc_det; -// break; -// case UniApiType.MaterialReturn: -// tableName = WmsTableName.xxwms_rt_det; -// break; -// case UniApiType.OtherIn: -// tableName = WmsTableName.xxwms_rct_det; -// break; -// case UniApiType.OtherOut: -// tableName = WmsTableName.xxwms_iss_det; -// break; -// case UniApiType.CheckUpdate: -// tableName = WmsTableName.xxwms_tag_det; -// break; -// case UniApiType.ProductSell: -// tableName = WmsTableName.xxwms_soiss_det; -// break; -// case UniApiType.StockDetail: -// tableName = WmsTableName.xxwms_ld_det; -// break; - default: - throw new ArgumentOutOfRangeException(nameof(uniApiType), uniApiType, null); - } - return tableName; - } - - ////创建采购订单 - //public static TS_UNI_API CreateBy(TB_PO bill, TB_PO_DETAIL detail, UniApiType uniApiType) - //{ - // var tableName = GetTableName(uniApiType); - // var apiData = new TS_UNI_API - // { - // InterfaceType = uniApiType.ToString(), - // TableName = tableName.ToString(), - // BillNum = bill.BillNum, - // PartCode = detail.PartCode, - // Batch = "", - // Qty = detail.BillQty, - // PoUnit = detail.PoUnit, - // LocUnit = detail.LocUnit, - // State = detail.State, - // CreateOper = bill.OperName, - // CreateTime = bill.BillTime, - // PutTime = ScpCache.GetServerTime(), - // VendId = bill.VendId, - // BillType = (int)BillType.PuchaseOrder, - // SubBillType = 0, - // ValidDate = detail.DueDate, - // ErpBillNum = bill.ErpBillNum, - // ErpLineNum = detail.LineNum, - // VendBatch = "", - // SourceBillNum = "", - // Price = detail.Price, - // PackQty = detail.PackQty, - // Currency = detail.Currency, - // Attn = "",//TODO - // Buyer = bill.Buyer, - // BuyerPhone = bill.BuyerPhone, - // ModType = bill.ModType, - // Receiver = "",//TODO - - // }; - // return apiData; - //} - - //创建发货单 - public static TS_UNI_API CreateBy(TB_ASN bill, TB_ASN_DETAIL detail, UniApiType uniApiType) - { - var tableName = GetTableName(uniApiType); - var apiData = new TS_UNI_API - { - InterfaceType = uniApiType.ToString(), - TableName = tableName.ToString(), - BillNum = bill.AskBillNum, - PartCode = detail.PartCode, - Batch = detail.Batch, - Qty = detail.Qty, - PoUnit = detail.PoUnit, - LocUnit = detail.LocUnit, - State = (int)detail.State, - CreateOper = bill.CreateUser, - CreateTime = bill.CreateTime, - PutTime = ScpCache.GetServerTime(), - VendId = bill.VendId, - BillType = (int)BillType.PuchaseOrder, - SubBillType = 0, - ValidDate = (DateTime)detail.ProduceDate, - ErpBillNum = bill.PoBillNum, - ErpLineNum = detail.PoLine, - VendBatch = detail.VendBatch, - Price = detail.Price, - PackQty = detail.PackQty, - Currency = detail.Currency, -// UmConv = detail.UmConv, - }; - return apiData; - } - - //创建条码 - public static TS_UNI_API CreateBy(TB_ASN bill, TS_BARCODE detail, UniApiType uniApiType) - { - var tableName = GetTableName(uniApiType); - var apiData = new TS_UNI_API - { - Barcode = detail.BarCode, - InterfaceType = uniApiType.ToString(), - TableName = tableName.ToString(), - BillNum = bill.AsnBillNum, - PartCode = detail.PartCode, - Batch = detail.Batch, - Qty = detail.Qty, - PoUnit = detail.PoUnit, - LocUnit = detail.LocUnit, - State = detail.State, - CreateOper = bill.CreateUser, - CreateTime = bill.CreateTime, - PutTime = ScpCache.GetServerTime(), - VendId = bill.VendId, - BillType = (int)BillType.PuchaseOrder, - SubBillType = 0, - ValidDate = detail.ProduceDate, - ErpBillNum = bill.PoBillNum, - ErpLineNum = detail.PoBillLine, - VendBatch = detail.VendBatch, - SourceBillNum = detail.FullBarCode, - PackQty = detail.PackQty, - }; - return apiData; - } - - //创建发票 - public static TS_UNI_API CreateBy(TB_INVOICE bill, TB_INVOICE_DETAIL detail, UniApiType uniApiType) - { - var tableName = GetTableName(uniApiType); - var apiData = new TS_UNI_API - { - InterfaceType = uniApiType.ToString(), - TableName = tableName.ToString(), - //BillNum = bill.BillNum, - PartCode = detail.PartCode, - Batch = "", - Qty = detail.Qty, - PoUnit = detail.PoUnit, - //LocUnit = detail.LocUnit, - State = detail.State, - //CreateOper = bill.OperName, - CreateTime = bill.CreateTime, - PutTime = ScpCache.GetServerTime(), - VendId = bill.VendId, - BillType = (int)BillType.PuchaseOrder, - SubBillType = 0, - ValidDate = detail.ProduceDate, - ErpBillNum = detail.PoBillNum, - ErpLineNum = detail.PoLineNum, - VendBatch = "", - SourceBillNum = "", - Price = detail.Price, - PackQty = detail.PackQty, - Currency = detail.Currency, - Invoice = bill.InvoiceNum, - //Tax = detail.Tax, - //TaxAmt = detail.TaxAmt, - }; - return apiData; - } - - public static List<TS_UNI_API> GetNewInterfaceList(ScpEntities wdb) - { - return wdb.TS_UNI_API.Where(p => p.State == (int)DataState.Enabled).OrderBy(p => p.UID).ToList(); - } - } -} \ No newline at end of file diff --git a/CK.SCP.UniApi_CQ/interface.ico b/CK.SCP.UniApi_CQ/interface.ico deleted file mode 100644 index c7a4d52..0000000 Binary files a/CK.SCP.UniApi_CQ/interface.ico and /dev/null differ diff --git a/CK.SCP.UniApi_CQ/packages.config b/CK.SCP.UniApi_CQ/packages.config deleted file mode 100644 index 33e13d6..0000000 --- a/CK.SCP.UniApi_CQ/packages.config +++ /dev/null @@ -1,5 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<packages> - <package id="EntityFramework" version="6.2.0" targetFramework="net452" /> - <package id="Newtonsoft.Json" version="10.0.3" targetFramework="net452" /> -</packages> \ No newline at end of file diff --git a/CK.SCP.UniApi_CQ/test1.Designer.cs b/CK.SCP.UniApi_CQ/test1.Designer.cs deleted file mode 100644 index 5c94eb0..0000000 --- a/CK.SCP.UniApi_CQ/test1.Designer.cs +++ /dev/null @@ -1,71 +0,0 @@ -namespace CK.SCP.UniApi -{ - partial class test1 - { - /// <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.button1 = new System.Windows.Forms.Button(); - this.richTextBox1 = new System.Windows.Forms.RichTextBox(); - this.SuspendLayout(); - // - // button1 - // - this.button1.Location = new System.Drawing.Point(64, 12); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(75, 23); - this.button1.TabIndex = 0; - this.button1.Text = "button1"; - this.button1.UseVisualStyleBackColor = true; - this.button1.Click += new System.EventHandler(this.button1_Click); - // - // richTextBox1 - // - this.richTextBox1.Location = new System.Drawing.Point(64, 60); - this.richTextBox1.Name = "richTextBox1"; - this.richTextBox1.Size = new System.Drawing.Size(469, 459); - this.richTextBox1.TabIndex = 1; - this.richTextBox1.Text = ""; - // - // test1 - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(567, 531); - this.Controls.Add(this.richTextBox1); - this.Controls.Add(this.button1); - this.Name = "test1"; - this.Text = "test1"; - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.Button button1; - private System.Windows.Forms.RichTextBox richTextBox1; - } -} \ No newline at end of file diff --git a/CK.SCP.UniApi_CQ/test1.cs b/CK.SCP.UniApi_CQ/test1.cs deleted file mode 100644 index 4c83ccd..0000000 --- a/CK.SCP.UniApi_CQ/test1.cs +++ /dev/null @@ -1,105 +0,0 @@ -using CK.SCP.Models; -using CK.SCP.Models.ScpEntity; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Data.Entity.Migrations; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace CK.SCP.UniApi -{ - public partial class test1 : Form - { - public test1() - { - InitializeComponent(); - } - - private void button1_Click(object sender, EventArgs e) - { - using (ScpEntities db = EntitiesFactory.CreateScpInstance()) - { - UpdateVender(db,db, "",(ret)=>{ - richTextBox1.Text = ret; - - }); - } - - } - private static void UpdateVender(ScpEntities idb, ScpEntities wdb, string seq ,Action<string> p_action) - { - - var ls = new List<string>(); - var qadDataList = idb.xxqad_vd_mstr.ToList(); - var wmsDataList = new List<TA_VENDER>(); - foreach (var qadData in qadDataList) - { - try - { - var wmsData = wdb.TA_VENDER.SingleOrDefault(p => p.VendId == qadData.xxqad_vd_addr.ToUpper()) ?? - new TA_VENDER { VendId = qadData.xxqad_vd_addr.ToUpper(), VendAbbCode = "0", State = 1 }; - wmsData.VendName = qadData.xxqad_vd_name; - wmsData.VendType = qadData.xxqad_vd_type.ToUpper().ToString(); - wmsData.Country = qadData.xxqad_vd_country; - wmsData.City = qadData.xxqad_vd_city; - wmsData.Currency = qadData.xxqad_vd_curr.ToUpper(); - // wmsData.Promo = qadData.xxqad_vd_promo; //国内国外 - wmsData.Address = qadData.xxqad_vd_line1 + qadData.xxqad_vd_line2 + qadData.xxqad_vd_line3; - wmsData.ZipCode = qadData.xxqad_vd_pst_id; - wmsData.Contacter = qadData.xxqad_vd_attn; - wmsData.Phone = qadData.xxqad_vd_phone; - wmsData.Fax = qadData.xxqad_vd_fax; - // wmsData.Email = ""; //QAD无此项 - wmsData.Tax = qadData.xxqad_vd_tax;//税率 - if (wmsDataList.Count(p => p.VendId == wmsData.VendId) == 0) - { - wmsDataList.Add(wmsData); - } - //qadData.xxqad_vd_scmread = ((int)UniApiState.成功).ToString(); - } - catch (Exception ex) - { - // qadData.xxqad_vd_scmread = ((int)UniApiState.失败).ToString(); - qadData.xxqad_vd_rmks += " SCM:" + ex.Message; - } - qadData.xxqad_vd_updateur = ScpCache.Config.SCP用户名; - qadData.xxqad_vd_updatedt = DateTime.Now; - - } - try - { - - - wdb.TA_VENDER.AddOrUpdate(wmsDataList.Where(p => !string.IsNullOrEmpty(p.VendName)).ToArray()); - wdb.SaveChanges(); - } - catch (System.Data.Entity.Validation.DbEntityValidationException dbEx)//捕获实体验证异常 - { - var sb = new StringBuilder(); - foreach (var error in dbEx.EntityValidationErrors.ToList()) - { - error.ValidationErrors.ToList().ForEach(i => - { - sb.AppendFormat("表:{0},字段:{1},信息:{2}\r\n", error.Entry.Entity.GetType().Name, i.PropertyName, i.ErrorMessage); - }); - } - - ls.Add(sb.ToString()); - - } - catch (Exception e) - { - ls.Add(e.Message); - } - - p_action( string.Join("\r\n", ls.ToArray())); - - Console.WriteLine($"更新 供应商 数据:{qadDataList.Count}"); - } - } -} diff --git a/CK.SCP.UniApi_CQ/test1.resx b/CK.SCP.UniApi_CQ/test1.resx deleted file mode 100644 index 1af7de1..0000000 --- a/CK.SCP.UniApi_CQ/test1.resx +++ /dev/null @@ -1,120 +0,0 @@ -<?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> \ No newline at end of file diff --git a/CK.SCP.UniApi_CQ/执行周期设置.ini b/CK.SCP.UniApi_CQ/执行周期设置.ini deleted file mode 100644 index bd7208b..0000000 Binary files a/CK.SCP.UniApi_CQ/执行周期设置.ini and /dev/null differ diff --git a/CK.SCP.UniApi_CQ/接口数据库设置.ini b/CK.SCP.UniApi_CQ/接口数据库设置.ini deleted file mode 100644 index 0c68b53..0000000 Binary files a/CK.SCP.UniApi_CQ/接口数据库设置.ini and /dev/null differ diff --git a/CK.SCP.UniApi_CQ/通用设置.ini b/CK.SCP.UniApi_CQ/通用设置.ini deleted file mode 100644 index 57e7a53..0000000 Binary files a/CK.SCP.UniApi_CQ/通用设置.ini and /dev/null differ diff --git a/CK.SCP.Utils/AppConfigHelper.cs b/CK.SCP.Utils/AppConfigHelper.cs deleted file mode 100644 index 07bd166..0000000 --- a/CK.SCP.Utils/AppConfigHelper.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System.Configuration; -using System.Linq; - -namespace CK.SCP.Utils -{ - public static class AppConfigHelper - { - - - /// <summary> - /// 获取AppSettings配置节中的Key值 - /// </summary> - /// <param name="keyName">Key's name</param> - /// <returns>Key's value</returns> - public static string GetAppValue(string keyName) - { - return ConfigurationManager.AppSettings.Get(keyName); - } /**/ - - /// <summary> - /// 获取ConnectionStrings配置节中的值 - /// </summary> - /// <returns></returns> - public static string GetConnectionString() - { - var settings = ConfigurationManager.ConnectionStrings["ConnString"]; - return settings.ConnectionString; - } /**/ - - /// <summary> - /// 保存节点中ConnectionStrings的子节点配置项的值 - /// </summary> - /// <param name="strConn"></param> - public static void SetConnectionString(string strConn) - { - var config = - ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); - config.ConnectionStrings.ConnectionStrings["ConnString"].ConnectionString = strConn; - config.Save(ConfigurationSaveMode.Modified); - ConfigurationManager.RefreshSection("connectionStrings"); - - } /**/ - - /// <summary> - /// 判断appSettings中是否有此项 - /// </summary> - private static bool IsAppKeyExists(string strKey, Configuration config) - { - return config.AppSettings.Settings.AllKeys.Any(str => str == strKey); - } /**/ - - /// <summary> - /// 保存appSettings中某key的value值 - /// </summary> - /// <param name="strKey">key's name</param> - /// <param name="newValue">value</param> - public static void SetAppValue(string strKey, string newValue) - { - var config = - ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); - if (!IsAppKeyExists(strKey, config)) return; - config.AppSettings.Settings[strKey].Value = newValue; - config.Save(ConfigurationSaveMode.Modified); - ConfigurationManager.RefreshSection("appSettings"); - } - - - } -} \ No newline at end of file diff --git a/CK.SCP.Utils/BackgroundWorkerEventArgs.cs b/CK.SCP.Utils/BackgroundWorkerEventArgs.cs deleted file mode 100644 index 632502a..0000000 --- a/CK.SCP.Utils/BackgroundWorkerEventArgs.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; - -namespace CK.SCP.Utils -{ - public class BackgroundWorkerEventArgs : EventArgs - { - /// <summary> - /// 后台程序运行时抛出的异常 - /// </summary> - public Exception BackGroundException { get; set; } - } -} \ No newline at end of file diff --git a/CK.SCP.Utils/CK.SCP.Utils.csproj b/CK.SCP.Utils/CK.SCP.Utils.csproj deleted file mode 100644 index 6ef1cb2..0000000 --- a/CK.SCP.Utils/CK.SCP.Utils.csproj +++ /dev/null @@ -1,110 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> - <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProjectGuid>{7118AC83-9DC0-41F5-94EA-E6F405AE0448}</ProjectGuid> - <OutputType>Library</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> - <RootNamespace>CK.SCP.Utils</RootNamespace> - <AssemblyName>CK.SCP.Utils</AssemblyName> - <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion> - <FileAlignment>512</FileAlignment> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>..\DLL\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>bin\Release\</OutputPath> - <DefineConstants>TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <ItemGroup> - <Reference Include="log4net"> - <HintPath>..\packages\log4net.2.0.8\lib\net40-full\log4net.dll</HintPath> - </Reference> - <Reference Include="Microsoft.Office.Interop.Excel, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"> - <SpecificVersion>False</SpecificVersion> - <EmbedInteropTypes>True</EmbedInteropTypes> - <HintPath>C:\Windows\assembly\GAC\Microsoft.Office.Interop.Excel\12.0.0.0__71e9bce111e9429c\Microsoft.Office.Interop.Excel.dll</HintPath> - </Reference> - <Reference Include="Newtonsoft.Json"> - <HintPath>..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath> - </Reference> - <Reference Include="System" /> - <Reference Include="System.configuration" /> - <Reference Include="System.Core" /> - <Reference Include="System.Drawing" /> - <Reference Include="System.Runtime.Serialization" /> - <Reference Include="System.Windows.Forms" /> - <Reference Include="System.Xml.Linq" /> - <Reference Include="System.Data.DataSetExtensions" /> - <Reference Include="Microsoft.CSharp" /> - <Reference Include="System.Data" /> - <Reference Include="System.Net.Http" /> - <Reference Include="System.Xml" /> - </ItemGroup> - <ItemGroup> - <Compile Include="AppConfigHelper.cs" /> - <Compile Include="BackgroundWorkerEventArgs.cs" /> - <Compile Include="EncryptHelper.cs" /> - <Compile Include="EnumExcelColor.cs" /> - <Compile Include="EnumHelper.cs" /> - <Compile Include="ExcelReader.cs" /> - <Compile Include="ExcelWriter.cs" /> - <Compile Include="FileHelper.cs" /> - <Compile Include="FormImportDataGrid.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="FormImportDataGrid.Designer.cs"> - <DependentUpon>FormImportDataGrid.cs</DependentUpon> - </Compile> - <Compile Include="FormProcess.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="FormProcess.Designer.cs"> - <DependentUpon>FormProcess.cs</DependentUpon> - </Compile> - <Compile Include="FtpHelper.cs" /> - <Compile Include="GzipHelper.cs" /> - <Compile Include="IoHelper.cs" /> - <Compile Include="JsonHelper.cs" /> - <Compile Include="ListHelper.cs" /> - <Compile Include="LogHelper.cs" /> - <Compile Include="MailHelper.cs" /> - <Compile Include="Md5Helper.cs" /> - <Compile Include="MessageHelper.cs" /> - <Compile Include="PredicateBuilder.cs" /> - <Compile Include="ProcessOperator.cs" /> - <Compile Include="ProgramHelper.cs" /> - <Compile Include="Properties\AssemblyInfo.cs" /> - <Compile Include="TraceLogger.cs" /> - <Compile Include="XmlHelper.cs" /> - </ItemGroup> - <ItemGroup> - <EmbeddedResource Include="FormImportDataGrid.resx"> - <DependentUpon>FormImportDataGrid.cs</DependentUpon> - </EmbeddedResource> - </ItemGroup> - <ItemGroup> - <None Include="packages.config" /> - </ItemGroup> - <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> - <!-- To modify your build process, add your task inside one of the targets below and uncomment it. - Other similar extension points exist, see Microsoft.Common.targets. - <Target Name="BeforeBuild"> - </Target> - <Target Name="AfterBuild"> - </Target> - --> -</Project> \ No newline at end of file diff --git a/CK.SCP.Utils/EncryptHelper.cs b/CK.SCP.Utils/EncryptHelper.cs deleted file mode 100644 index 3f7c8e3..0000000 --- a/CK.SCP.Utils/EncryptHelper.cs +++ /dev/null @@ -1,73 +0,0 @@ -using System; -using System.IO; -using System.Security.Cryptography; -using System.Text; - -namespace CK.SCP.Utils -{ - public static class EncryptHelper - { - private const string EncryptKey = "CCCKKEJI"; - //定义密钥 - /// <summary> - /// DEC 加密过程 - /// </summary> - /// <param name="pToEncrypt">被加密的字符串</param> - /// <returns>加密后的字符串</returns> - public static string Encrypt(string pToEncrypt) - { - //访问数据加密标准(DES)算法的加密服务提供程序 (CSP) 版本的包装对象 - var des = new DESCryptoServiceProvider - { - Key = Encoding.ASCII.GetBytes(EncryptKey), - IV = Encoding.ASCII.GetBytes(EncryptKey) - }; - - var inputByteArray = Encoding.Default.GetBytes(pToEncrypt);//把字符串放到byte数组中 - - var ms = new MemoryStream();//创建其支持存储区为内存的流  - //定义将数据流链接到加密转换的流 - var cs = new CryptoStream(ms, des.CreateEncryptor(), CryptoStreamMode.Write); - cs.Write(inputByteArray, 0, inputByteArray.Length); - cs.FlushFinalBlock(); - //上面已经完成了把加密后的结果放到内存中去 - - var ret = new StringBuilder(); - foreach (var b in ms.ToArray()) - { - ret.AppendFormat("{0:X2}", b); - } - return ret.ToString(); - - } - - /// <summary> - /// DEC 解密过程 - /// </summary> - /// <param name="pToDecrypt">被解密的字符串</param> - /// <returns>返回被解密的字符串</returns> - public static string Decrypt(string pToDecrypt) - { - var des = new DESCryptoServiceProvider(); - - var inputByteArray = new byte[pToDecrypt.Length / 2]; - for (var x = 0; x < pToDecrypt.Length / 2; x++) - { - var i = (Convert.ToInt32(pToDecrypt.Substring(x * 2, 2), 16)); - inputByteArray[x] = (byte)i; - } - - des.Key = Encoding.ASCII.GetBytes(EncryptKey); //建立加密对象的密钥和偏移量,此值重要,不能修改 - des.IV = Encoding.ASCII.GetBytes(EncryptKey); - var ms = new MemoryStream(); - var cs = new CryptoStream(ms, des.CreateDecryptor(), CryptoStreamMode.Write); - - cs.Write(inputByteArray, 0, inputByteArray.Length); - cs.FlushFinalBlock(); - - return Encoding.Default.GetString(ms.ToArray()); - } - - - } -} \ No newline at end of file diff --git a/CK.SCP.Utils/EnumExcelColor.cs b/CK.SCP.Utils/EnumExcelColor.cs deleted file mode 100644 index 46cf574..0000000 --- a/CK.SCP.Utils/EnumExcelColor.cs +++ /dev/null @@ -1,91 +0,0 @@ -namespace CK.SCP.Utils -{ - public enum EnumExcelColor - { - - 无色 = -4142, - - 自动 = -4105, - - 黑色 = 1, - - 褐色 = 53, - - 橄榄 = 52, - - 深绿 = 51, - - 深青 = 49, - - 深蓝 = 11, - - 靛蓝 = 55, - - 灰色80 = 56, - - 深红 = 9, - - 橙色 = 46, - - 深黄 = 12, - - 绿色 = 10, - - 青色 = 14, - - 蓝色 = 5, - - 蓝灰 = 47, - - 灰色50 = 16, - - 红色 = 3, - - 浅橙色 = 45, - - 酸橙色 = 43, - - 海绿 = 50, - - 水绿色 = 42, - - 浅蓝 = 41, - - 紫罗兰 = 13, - - 灰色40 = 48, - - 粉红 = 7, - - 金色 = 44, - - 黄色 = 6, - - 鲜绿 = 4, - - 青绿 = 8, - - 天蓝 = 33, - - 梅红 = 54, - - 灰色25 = 15, - - 玫瑰红 = 38, - - 茶色 = 40, - - 浅黄 = 36, - - 浅绿 = 35, - - 浅青绿 = 34, - - 淡蓝 = 37, - - 淡紫 = 39, - - 白色 = 2 - - } -} \ No newline at end of file diff --git a/CK.SCP.Utils/EnumHelper.cs b/CK.SCP.Utils/EnumHelper.cs deleted file mode 100644 index 35d708b..0000000 --- a/CK.SCP.Utils/EnumHelper.cs +++ /dev/null @@ -1,92 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Reflection; - -namespace CK.SCP.Utils -{ - public class EnumItem - { - public EnumItem(string name, string desc, int value) - { - Name = name; - Desc = desc; - Value = value; - } - - public EnumItem() - { - - } - - - public string Name { get; set; } - public string Desc { get; set; } - public int Value { get; set; } - - } - - public static class EnumHelper - { - public static List<EnumItem> EnumToList<T>() - { - List<EnumItem> list = new List<EnumItem>(); - var type = typeof(T); - foreach (var name in Enum.GetNames(type)) - { - var text = GetText<T>(type, name); - int value = (int) Enum.Parse(type, name); - list.Add(new EnumItem (name,text,value)); - } - return list; - } - - - public static Dictionary<string,int> EnumToDict<T>() - { - Dictionary<string, int> dictionary = new Dictionary<string, int>(); - var type = typeof (T); - foreach (var name in Enum.GetNames(type)) - { - var text = GetText<T>(type, name); - dictionary.Add(text, (int) Enum.Parse(type, name)); - } - return dictionary; - } - - private static string GetText<T>(Type type, string name) - { - var fieldInfo = type.GetField(name); - var text = name; - if (fieldInfo != null) - { - // 获取描述的属性。 - DescriptionAttribute attr = Attribute.GetCustomAttribute(fieldInfo, - typeof (DescriptionAttribute), false) as DescriptionAttribute; - if (attr != null) - { - text = attr.Description; - } - } - return text; - } - - - public static string GetDescription(Enum value) - { - Type enumType = value.GetType(); - // 获取枚举常数名称。 - var name = Enum.GetName(enumType, value); - if (name == null) return null; - // 获取枚举字段。 - var fieldInfo = enumType.GetField(name); - if (fieldInfo == null) return null; - // 获取描述的属性。 - var attr = Attribute.GetCustomAttribute(fieldInfo, - typeof(DescriptionAttribute), false) as DescriptionAttribute; - return attr?.Description; - } - - } - -} \ No newline at end of file diff --git a/CK.SCP.Utils/ExcelReader.cs b/CK.SCP.Utils/ExcelReader.cs deleted file mode 100644 index cd6886f..0000000 --- a/CK.SCP.Utils/ExcelReader.cs +++ /dev/null @@ -1,435 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Data; -using System.Data.OleDb; -using System.Diagnostics; -using System.Windows.Forms; - -namespace CK.SCP.Utils -{ - public class ExcelReader - - { - - private DataSet _dsExcel; - private DataTable _dtExcel; - private string _fileExt; - private string _filePath; - private List<string> _readSheetName; - // private string _saveFileName; - private string _sheetName; - private List<string> _sheetNames; - - /// <summary> - /// ȡExcelļDataSet - /// </summary> - /// <returns></returns> - public DataSet ReturnDataSet() - { - var openFileDialog = new OpenFileDialog { Filter = "Execl files (*.xls,*.xlsx)|*.xls;*.xlsx" }; - //openFileDialog.RestoreDirectory = true; - //openFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Personal); - - if (openFileDialog.ShowDialog() == DialogResult.OK) - { - _filePath = openFileDialog.FileName; - _fileExt = openFileDialog.FileName.Substring(openFileDialog.FileName.LastIndexOf('.')); - var poDv = new ProcessOperator { BackgroundWork = ReadExcelToDataSet }; - poDv.BackgroundWorkerCompleted += ReadExcel_Completed; - poDv.Start(); - } - return _dsExcel; - } - - /// <summary> - /// ȡExcelļDataSet - /// </summary> - /// <param name="filePath">Excelļַ</param> - /// <returns></returns> - public DataSet ReturnDataSet(string filePath) - { - try - { - if (string.IsNullOrEmpty(filePath)) - return ReturnDataSet(); - _filePath = filePath; - _fileExt = filePath.Substring(filePath.LastIndexOf('.')); - - if (_fileExt.ToUpper() == ".XLSX" || _fileExt.ToUpper() == ".XLS") - { - var poDv = new ProcessOperator { BackgroundWork = ReadExcelToDataSet }; - poDv.BackgroundWorkerCompleted += ReadExcel_Completed; - poDv.Start(); - } - else - { - MessageBox.Show("޷ú׺ļ"); - } - } - catch (Exception ex) - { - MessageBox.Show(ex.Message); - } - return _dsExcel; - } - - - /// <summary> - /// ȡExcelļDataSet - /// </summary> - /// <param name="sheetNames">ȡExcelļƼ</param> - /// <returns></returns> - public DataSet ReturnDataSet(List<string> sheetNames) - { - var openFileDialog = new OpenFileDialog { Filter = "Execl files (*.xls,*.xlsx)|*.xls;*.xlsx" }; - //openFileDialog.RestoreDirectory = true; - //openFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Personal); - if (openFileDialog.ShowDialog() == DialogResult.OK) - { - _sheetNames = sheetNames; - _filePath = openFileDialog.FileName; - _fileExt = openFileDialog.FileName.Substring(openFileDialog.FileName.LastIndexOf('.')); - var poDv = new ProcessOperator { BackgroundWork = ReadExcelToDataSet }; - poDv.BackgroundWorkerCompleted += ReadExcel_Completed; - poDv.Start(); - } - return _dsExcel; - } - - /// <summary> - /// ȡExcelļDataSet - /// </summary> - /// <param name="filePath">Excelļַ</param> - /// <param name="sheetNames">ȡExcelļƼ</param> - /// <returns></returns> - public DataSet ReturnDataSet(string filePath, List<string> sheetNames) - { - try - { - if (string.IsNullOrEmpty(filePath)) - return ReturnDataSet(); - if (sheetNames == null || sheetNames.Count == 0) - return ReturnDataSet(filePath); - - _filePath = filePath; - _fileExt = filePath.Substring(filePath.LastIndexOf('.')); - _sheetNames = sheetNames; - if (_fileExt.ToUpper() == ".XLSX" || _fileExt.ToUpper() == ".XLS") - { - var poDv = new ProcessOperator { BackgroundWork = ReadExcelToDataSet }; - poDv.BackgroundWorkerCompleted += ReadExcel_Completed; - poDv.Start(); - } - else - { - MessageBox.Show("޷ú׺ļ"); - } - } - catch (Exception ex) - { - MessageBox.Show(ex.Message); - } - return _dsExcel; - } - - /// <summary> - /// ȡExcelļsheetDataTable - /// </summary> - /// <param name="sheetName">Excelļ</param> - /// <returns></returns> - public DataTable ReturnDataTable(string sheetName) - { - var openFileDialog = new OpenFileDialog { Filter = "Execl files (*.xls,*.xlsx)|*.xls;*.xlsx" }; - //openFileDialog.RestoreDirectory = true; - //openFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Personal); - if (openFileDialog.ShowDialog() == DialogResult.OK) - { - _filePath = openFileDialog.FileName; - _fileExt = openFileDialog.FileName.Substring(openFileDialog.FileName.LastIndexOf('.')); - _sheetName = sheetName; - var poDv = new ProcessOperator { BackgroundWork = ReadToDataTable }; - poDv.BackgroundWorkerCompleted += ReadExcel_Completed; - poDv.Start(); - } - return _dtExcel; - } - - /// <summary> - /// ȡExcelļsheetDataTable - /// </summary> - /// <param name="filePath">Excelļַ</param> - /// <param name="sheetName">Excelļ</param> - /// <returns></returns> - public DataTable ReturnDataTable(string filePath, string sheetName) - { - try - { - if (string.IsNullOrEmpty(filePath)) - return ReturnDataTable(sheetName); - _filePath = filePath; - _fileExt = filePath.Substring(filePath.LastIndexOf('.')); - - if (_fileExt.ToUpper() == ".XLSX" || _fileExt.ToUpper() == ".XLS") - { - _sheetName = sheetName; - var poDv = new ProcessOperator { BackgroundWork = ReadToDataTable }; - poDv.BackgroundWorkerCompleted += ReadExcel_Completed; - poDv.Start(); - } - else - { - MessageBox.Show("޷ú׺ļ"); - } - } - catch (Exception ex) - { - MessageBox.Show(ex.Message); - } - return _dtExcel; - } - - private void ReadExcel_Completed(object sender, BackgroundWorkerEventArgs e) - { - if (e.BackGroundException == null) - { - //if (readSheetName != null && readSheetName.Count > 0) - //{ - // //StringBuilder sb = new StringBuilder(); - // //sb.Append("ļȡɹ\n\r" + filePath + "\n\rȡ " + readSheetName.Count.ToString() + " Sheet\n\rֱǣ\n\r"); - // //int i = 0; - // //foreach (String SheetName in readSheetName) - // //{ - // // i ++; - // // sb.Append(SheetName + ","); - // // if (i % 3 == 0) - // // { - // // sb.Append("\n\r"); - // // } - // //} - // //String message = sb.ToString(); - // //message = message.Substring(0, message.Length - 1); - // //System.Windows.Forms.MessageBox.Show(message); - - //} - //else - //{ - // MessageBox.Show("ļȡɹ\n\r" + filePath + "\n\rȡ 0 Sheet"); - //} - if (_readSheetName == null || _readSheetName.Count == 0) - { - MessageBox.Show("ļʧܣδҵϵϵͳҪĹ"); - } - } - else - { - //MessageBox.Show("ļȡʧܣ\n\r" + filePath + "\n\rȡ 0 Sheet\n\rԺԣ"); - MessageBox.Show("ļȡʧ,ϵԱ"); - } - } - - private void ReadExcelToDataSet() - { - OleDbConnection connExcel = null; - try - { - _readSheetName = new List<string>(); - _dsExcel = new DataSet(); - - var connString = ""; - if (_fileExt.ToUpper() == ".XLSX") - { - connString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + _filePath + - ";Extended Properties='Excel 12.0;HDR=YES;IMEX=1'"; - } - else - { - connString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source = " + _filePath + - ";Extended Properties = 'Excel 8.0;HDR=YES;IMEX=1'"; - } - connExcel = new OleDbConnection(connString); - connExcel.Open(); - var dtSheetNames = connExcel.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, - new object[] { null, null, null, "TABLE" }); - var sqlExcel = ""; - OleDbDataAdapter myCommand = null; - var tableName = ""; - var selectTable = ""; - if (_sheetNames != null && _sheetNames.Count > 0) - { - foreach (var sheetName in _sheetNames) - { - Debug.Assert(dtSheetNames != null, "dtSheetNames != null"); - for (var i = 0; i < dtSheetNames.Rows.Count; i++) - { - var res = 0; - tableName = dtSheetNames.Rows[i]["TABLE_NAME"].ToString().Replace("'", "").Replace("$", ""); - selectTable = dtSheetNames.Rows[i]["TABLE_NAME"].ToString(); - if (tableName.Length <= 4 || tableName.Equals("_xlnm#_FilterDatabase") || - !int.TryParse(tableName.Substring(0, 4), out res) || - tableName.IndexOf("_", StringComparison.Ordinal) == (tableName.Length - 1) || - tableName.IndexOf("FilterDatabase", StringComparison.Ordinal) != -1) continue; - if (!(tableName.Replace("'", "").Replace("$", "")).Equals(sheetName)) continue; - sqlExcel = string.Format(" select * from [" + selectTable + "]"); - myCommand = new OleDbDataAdapter(sqlExcel, connString); - myCommand.Fill(_dsExcel, tableName); - RemoveEmptyRow(_dsExcel.Tables[tableName]); - _readSheetName.Add(tableName); - break; - } - } - } - else - { - Debug.Assert(dtSheetNames != null, "dtSheetNames != null"); - for (var i = 0; i < dtSheetNames.Rows.Count; i++) - { - var res = 0; - tableName = dtSheetNames.Rows[i]["TABLE_NAME"].ToString().Replace("'", "").Replace("$", ""); - selectTable = dtSheetNames.Rows[i]["TABLE_NAME"].ToString(); - if (tableName.Length <= 4 || tableName.Equals("_xlnm#_FilterDatabase") || - !int.TryParse(tableName.Substring(0, 4), out res) || - tableName.IndexOf("_", StringComparison.Ordinal) == (tableName.Length - 1) || - tableName.IndexOf("FilterDatabase", StringComparison.Ordinal) != -1) continue; - sqlExcel = string.Format(" select * from [" + selectTable + "]"); - myCommand = new OleDbDataAdapter(sqlExcel, connString); - myCommand.Fill(_dsExcel, tableName); - RemoveEmptyRow(_dsExcel.Tables[tableName]); - _readSheetName.Add(tableName); - } - } - connExcel.Close(); - } - catch (Exception ex) - { - MessageBox.Show(ex.Message); - } - finally - { - if (connExcel != null) - { - connExcel.Close(); - } - } - } - - - private void ReadToDataTable() - { - OleDbConnection connExcel = null; - try - { - _readSheetName = new List<string>(); - _dsExcel = new DataSet(); - var connString = ""; - if (_fileExt.ToUpper() == ".XLSX") - { - connString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + _filePath + - ";Extended Properties='Excel 12.0;HDR=YES;IMEX=1'"; - } - else - { - connString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source = " + _filePath + - ";Extended Properties = 'Excel 8.0;HDR=YES;IMEX=1'"; - } - connExcel = new OleDbConnection(connString); - connExcel.Open(); - var dtSheetNames = connExcel.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, - new object[] { null, null, null, "TABLE" }); - - var sqlExcel = ""; - OleDbDataAdapter myCommand = null; - var tableName = ""; - var selectTable = ""; - if (string.IsNullOrEmpty(_sheetName)) - { - var b = true; - var i = 0; - while (b) - { - if (dtSheetNames != null) - { - tableName = dtSheetNames.Rows[i]["TABLE_NAME"].ToString().Replace("'", "").Replace("$", ""); - selectTable = dtSheetNames.Rows[i]["TABLE_NAME"].ToString(); - } -// int res; - if (tableName.Length <= 4 - || tableName.Equals("_xlnm#_FilterDatabase") -// || !int.TryParse(tableName.Substring(0, 4), out res) - || tableName.IndexOf("_", StringComparison.Ordinal) == (tableName.Length - 1) - || tableName.IndexOf("FilterDatabase", StringComparison.Ordinal) != -1 - ) - { - if (dtSheetNames != null && i < dtSheetNames.Rows.Count) - { - i++; - } - else - { - b = false; - } - } - else - { - sqlExcel = string.Format(" select * from [" + selectTable + "]"); - myCommand = new OleDbDataAdapter(sqlExcel, connString); - myCommand.Fill(_dsExcel, tableName); - RemoveEmptyRow(_dsExcel.Tables[tableName]); - _dtExcel = _dsExcel.Tables[0]; - _readSheetName.Add(tableName); - b = false; - } - } - } - else - { - Debug.Assert(dtSheetNames != null, "dtSheetNames != null"); - for (var i = 0; i < dtSheetNames.Rows.Count; i++) - { - tableName = dtSheetNames.Rows[i]["TABLE_NAME"].ToString().Replace("'", "").Replace("$", ""); - selectTable = dtSheetNames.Rows[i]["TABLE_NAME"].ToString(); - if (!(tableName).Equals(_sheetName)) continue; - sqlExcel = string.Format(" select * from [" + selectTable + "]"); - myCommand = new OleDbDataAdapter(sqlExcel, connString); - myCommand.Fill(_dsExcel, tableName); - RemoveEmptyRow(_dsExcel.Tables[tableName]); - _dtExcel = _dsExcel.Tables[_sheetName]; - _readSheetName.Add(tableName); - return; - } - } - connExcel.Close(); - } - catch (Exception ex) - { - MessageBox.Show(ex.Message); - } - finally - { - if (connExcel != null) - { - connExcel.Close(); - } - } - } - - public static void RemoveEmptyRow(DataTable dt) - { - if (dt == null || dt.Rows.Count == 0) - return; - var isEmpty = true; - for (var idx = dt.Rows.Count - 1; idx >= 0; idx--) - { - var dr = dt.Rows[idx]; - for (var i = 0; i < dt.Columns.Count; i++) - { - if (dr[i].ToString().Trim() != string.Empty) - { - isEmpty = false; - } - } - if (isEmpty) - dt.Rows.Remove(dr); - } - } - } -} \ No newline at end of file diff --git a/CK.SCP.Utils/ExcelWriter.cs b/CK.SCP.Utils/ExcelWriter.cs deleted file mode 100644 index 1cad4da..0000000 --- a/CK.SCP.Utils/ExcelWriter.cs +++ /dev/null @@ -1,437 +0,0 @@ -using System; -using System.Data; -using System.Diagnostics; -using System.Globalization; -using System.IO; -using System.Reflection; -using System.Runtime.InteropServices; -using System.Windows.Forms; -using Microsoft.Office.Interop.Excel; -using Application = Microsoft.Office.Interop.Excel.Application; -using DataTable = System.Data.DataTable; - -namespace CK.SCP.Utils -{ - public static class ExcelWriter - { - //ieachsize为每次写行的数值,可以自己设置 - private const int EachSize = 5000; - private const int RStartIndex = 1; - private const int CStartIndex = 0; - - public static readonly SaveFileDialog SaveFileDialog = new SaveFileDialog - { - Filter = "Excel 工作簿 (*.xlsx)|*.xlsx", - CheckFileExists = false, - CheckPathExists = false, - FilterIndex = 0, - RestoreDirectory = true, - CreatePrompt = false, - Title = "保存为Excel文件" - }; - - - private static void SetWorkSheetValue(Application excel, Worksheet sheet, DataTable dt, string fileName) - { - Range r = null; - var rIdx = RStartIndex; - var cIdx = CStartIndex; - if (!string.IsNullOrEmpty(dt.TableName)) - { - sheet.Name = dt.TableName; - } - - // - //取得标题 - // - foreach (DataColumn dc in dt.Columns) - { - cIdx++; - excel.Cells[rIdx, cIdx] = dc.ColumnName; - //设置标题格式为居中对齐 - r = sheet.Range[excel.Cells[rIdx, cIdx], excel.Cells[rIdx, cIdx]]; - r.HorizontalAlignment = XlVAlign.xlVAlignCenter; - r.Interior.ColorIndex = 19; - } - - //因为第一行已经写了表头,所以所有数据都应该从a2开始 - r = sheet.Range[excel.Cells[rIdx, cIdx], excel.Cells[rIdx, cIdx]]; - - //irowcount为实际行数,最大行 - var irowcount = dt.Rows.Count; - int iParstedRow = 0, iCurSize = 0; - //ieachsize为每次写行的数值,可以自己设置 - - //icolumnaccount为实际列数,最大列数 - var iColumnsCount = dt.Columns.Count; - //在内存中声明一个ieachsize×icolumnaccount的数组,ieachsize是每次最大存储的行数,icolumnaccount就是存储的实际列数 - var objval = new object[EachSize, iColumnsCount]; - iCurSize = EachSize; - while (iParstedRow < irowcount) - { - if ((irowcount - iParstedRow) < EachSize) - iCurSize = irowcount - iParstedRow; - //用for循环给数组赋值 - for (var i = 0; i < iCurSize; i++) - { - for (var j = 0; j < iColumnsCount; j++) - { - var s = dt.Rows[i + iParstedRow][j].ToString(); - ////////////////// - //格式化日期字段 - var dc = dt.Columns[j]; - if (dc.DataType.FullName == "System.DateTime" && s != null && s != "") - { - DateTime time; - DateTime.TryParse(s, out time); - s = time.ToString(); - } - ////////////////// - decimal d; - if (decimal.TryParse(s, out d)) - { - if (Math.Round(d, 5) == 0) - { - objval[i, j] = string.Empty; - continue; - } - } - objval[i, j] = s; - } - System.Windows.Forms.Application.DoEvents(); - } - var X = "A" + (iParstedRow + 2); - var col = ""; - if (iColumnsCount <= 26) - { - col = ((char)('A' + iColumnsCount - 1)) + - ((iParstedRow + iCurSize + 1)).ToString(CultureInfo.InvariantCulture); - } - else - { - col = ((char)('A' + (iColumnsCount / 26 - 1))) + - ((char)('A' + (iColumnsCount % 26 - 1))).ToString() + - ((iParstedRow + iCurSize + 1)); - } - r = sheet.Range[X, col]; - // 调用range的value2属性,把内存中的值赋给excel - r.Value2 = objval; - iParstedRow = iParstedRow + iCurSize; - } - - var rSumIdx = dt.Rows.Count + 1; - var cSumIdx = CStartIndex + 1; - - // //加载一个合计行 - // // - // //excel.Cells[rowSum, 2] = "合计"; - // - // r = sheet.Range[excel.Cells[rSumIdx, 2], excel.Cells[rSumIdx, 2]]; - // r.HorizontalAlignment = XlVAlign.xlVAlignCenter; - // - // // - //设置选中的部分的颜色 - // - r = sheet.Range[excel.Cells[2, cSumIdx], excel.Cells[2, cIdx]]; - r.Select(); - //设置为浅黄色,共计有56种 - // r.Interior.ColorIndex = 19; - - - // - //设置报表表格为最适应宽度 - // - r = sheet.Range[excel.Cells[RStartIndex, cSumIdx], excel.Cells[rSumIdx, cIdx]]; - r.Select(); - r.Columns.AutoFit(); - - - // - //绘制边框 - // - r = sheet.Range[excel.Cells[RStartIndex, cSumIdx], excel.Cells[rSumIdx, cIdx]]; - r.Borders.LineStyle = 1; - - r = sheet.Range[excel.Cells[RStartIndex, cSumIdx], excel.Cells[rSumIdx, cSumIdx]]; - r.Borders[XlBordersIndex.xlEdgeLeft].Weight = XlBorderWeight.xlThick; //设置左边线加粗 - - r = sheet.Range[excel.Cells[RStartIndex, cSumIdx], excel.Cells[RStartIndex, cIdx]]; - r.Borders[XlBordersIndex.xlEdgeTop].Weight = XlBorderWeight.xlThick; //设置上边线加粗 - - r = sheet.Range[excel.Cells[RStartIndex, cIdx], excel.Cells[rSumIdx, cIdx]]; - r.Borders[XlBordersIndex.xlEdgeRight].Weight = XlBorderWeight.xlThick; //设置右边线加粗 - - r = sheet.Range[excel.Cells[rSumIdx, cSumIdx], excel.Cells[rSumIdx, cIdx]]; - r.Borders[XlBordersIndex.xlEdgeBottom].Weight = XlBorderWeight.xlThick; //设置下边线加粗 - - //r = sheet.Range[excel.Cells[0, 0], null]; - - // - //显示效果 - // - excel.Visible = false; - excel.DisplayAlerts = false; - excel.AlertBeforeOverwriting = false; - } - - private static void ReleaseObject(object obj) - { - try - { - Marshal.ReleaseComObject(obj); - obj = null; - } - catch - { - obj = null; - } - finally - { - GC.Collect(); - } - } - - [DllImport("User32.dll", CharSet = CharSet.Auto)] - private static extern int GetWindowThreadProcessId(IntPtr hwnd, out int ID); - - private static void Kill(_Application excel) - { - try - { - var t = new IntPtr(excel.Hwnd); - var k = 0; - GetWindowThreadProcessId(t, out k); - var p = Process.GetProcessById(k); - p.Kill(); - } - catch (Exception ex) - { - MessageBox.Show(ex.ToString()); - } - } - - /// <summary> - /// 将DataTable数据写入Excel文件 - /// </summary> - /// <param name="dt">DataTable</param> - public static void Write(DataTable dt) - { - if (SaveFileDialog.ShowDialog() == DialogResult.OK) - { - var fileName = SaveFileDialog.FileName; - WriteDataTableToExcel(dt, fileName); - } - } - - - /// <summary> - /// 将DataTable数据写入Excel文件 - /// </summary> - /// <param name="dt">DataTable</param> - /// <param name="fileName">Excel文件路径</param> - public static void Write(DataTable dt, string fileName) - { - try - { - if (string.IsNullOrEmpty(fileName)) - { - Write(dt); - } - else - { - WriteDataTableToExcel(dt, fileName); - } - } - catch - { - MessageBox.Show("无法解析文件路径!"); - } - } - - private static void WriteDataTableToExcel(DataTable dt, string fileName) - { - var fileExt = fileName.Substring(fileName.LastIndexOf('.')); - if (fileExt.ToUpper() == ".XLSX") - { - if (dt != null && dt.Rows.Count > 0) - { - var poDv = new ProcessOperator - { - BackgroundWork = () => WriteExcelByDataTable(dt, fileName) - }; - poDv.BackgroundWorkerCompleted += WriteExcel_Completed; - poDv.Start(); - } - else - { - MessageBox.Show("当前表单没有任何数据"); - } - } - else - { - MessageBox.Show("无法解析该后缀名的文件!"); - } - } - - // /// <summary> - // /// 将DataSet数据写入Excel文件 - // /// </summary> - // /// <param name="dsExcel">DataSet</param> - // public void Write(DataSet dsExcel) - // { - // if (dsExcel != null && dsExcel.Tables.Count > 0) - // { - // if (_saveFileDialog.ShowDialog() == DialogResult.OK) - // { - // string fileName = _saveFileDialog.FileName; //得到存放路径 - // var poDv = new ProcessOperator - // { - // MessageInfo = @"正在写入" + Path.GetFileName(fileName) + "文件", - // BackgroundWork = () => WriteExcelByDataSet(dsExcel, fileName) - // }; - // poDv.BackgroundWorkerCompleted += WriteExcel_Completed; - // poDv.Start(); - // } - // } - // else - // { - // MessageBox.Show("当前没有任何表单!"); - // } - // } - - public static void Write(DataSet ds) - { - if (SaveFileDialog.ShowDialog() == DialogResult.OK) - { - var fileName = SaveFileDialog.FileName; - Write(ds, fileName); - } - } - - public static void Write(DataSet dsExcel, string fileName) - { - try - { - // if (string.IsNullOrEmpty(fileName)) - // { - // Write(dsExcel); - // } - // else - // { - if (dsExcel != null && dsExcel.Tables.Count > 0) - { - if (File.Exists(fileName)) - File.Delete(fileName); - //_saveFileDialog.FileName = fileName; - //if (_saveFileDialog.ShowDialog() == DialogResult.OK) - { - //_writeSheetName = new List<string>(); - foreach (DataTable dt in dsExcel.Tables) - { - if (dt == null || dt.TableName == null || dt.TableName == "") continue; - ExcelReader.RemoveEmptyRow(dt); - //string name = _saveFileDialog.FileName; - var dt1 = dt; - var poDv = new ProcessOperator - { - MessageInfo = @"正在写入" + Path.GetFileName(fileName) + "," + dt.TableName, - BackgroundWork = () => WriteExcelByDataTable(dt1, fileName) - }; - poDv.Start(); - } - WriteExcel_Completed(null, null); - } - } - else - { - MessageBox.Show("当前没有任何表单!"); - } - // } - } - catch (Exception ex) - { - MessageBox.Show("无法解析文件路径!\n" + ex); - } - } - - public static void WriteExcelByDataTable(DataTable dt, string fileName) - { - // if (_writeSheetName == null) - // { - // _writeSheetName = new List<string>(); - // } - - Workbook workbook = null; - Worksheet sheet = null; - var excel = new Application(); - var miss = Missing.Value; - try - { - if (File.Exists(fileName)) - { - workbook = excel.Workbooks.Open(fileName, 0, false, 5, "", "", false, XlPlatform.xlWindows, "", true, - false, 0, true, false, false); - var sheets = workbook.Sheets; - var existSheetName = string.Empty; - for (var i = 1; i <= sheets.Count; i++) - { - if (sheets[i].Name != dt.TableName) continue; - sheets[i].Name += "(副本)"; - existSheetName = sheets[i].Name; - } - sheet = (Worksheet)sheets.Add(sheets[1], miss, miss, miss); - - SetWorkSheetValue(excel, sheet, dt, fileName); - - workbook.Save(); - if (!string.IsNullOrEmpty(existSheetName)) - sheets[existSheetName].Delete(); - } - else - { - workbook = excel.Workbooks.Add(true); - sheet = (Worksheet)workbook.ActiveSheet; - SetWorkSheetValue(excel, sheet, dt, fileName); - // workbook.SaveAs(fileName, XlFileFormat.xlOpenDocumentSpreadsheet, miss, miss, miss, miss, - // XlSaveAsAccessMode.xlExclusive, miss, miss, miss, miss, miss); - workbook.SaveAs(fileName, miss, miss, miss, miss, miss, - XlSaveAsAccessMode.xlNoChange, miss, miss, miss, miss, miss); - } - } - catch (Exception ex) - { - MessageBox.Show(ex.ToString()); - } - finally - { - workbook.Close(true, Missing.Value, Missing.Value); - excel.Quit(); - Kill(excel); //调用kill当前excel进程 - ReleaseObject(workbook); - ReleaseObject(sheet); - ReleaseObject(excel); - } - } - - // private void WriteExcelByDataSet(DataSet dsExcel, string fileName) - // { - // //_writeSheetName = new List<string>(); - // foreach (DataTable dtExcel in dsExcel.Tables) - // { - // if (dtExcel == null || dtExcel.TableName == null || dtExcel.TableName == "") continue; - // ListHelper.RemoveEmptyRow(dtExcel); - // //_dtExcel = dt; - // WriteExcelByDataTable(dtExcel, fileName); - // } - // } - - private static void WriteExcel_Completed(object sender, BackgroundWorkerEventArgs e) - { - Process.Start(SaveFileDialog.FileName); - // MessageBox.Show("导出完成"); - // MessageBox.Show(e.BackGroundException == null - // ? Path.GetFileName(_filePath) + "文件写入成功!" - // : Path.GetFileName(_filePath) + "文件写入失败,请联系管理员!"); - } - } -} \ No newline at end of file diff --git a/CK.SCP.Utils/FileHelper.cs b/CK.SCP.Utils/FileHelper.cs deleted file mode 100644 index 4f66803..0000000 --- a/CK.SCP.Utils/FileHelper.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System.IO; -using System.Reflection; -using System.Text; - -namespace CK.SCP.Utils -{ - public static class FileHelper - { - public static string GetApplicationPath() - { - string path = Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase); - path = path.Replace(@"file:\", ""); - if (path.Substring(path.Length - 1, 1) != @"\") - { - path += @"\"; - } - return path; - } - - public static void Create(string path) - { - if (!Directory.Exists(path)) - Directory.CreateDirectory(path); - } - - public static bool Exists(string filename) - { - filename = GetApplicationPath() + filename; - return File.Exists(filename); - } - - public static void WriteFile(string filename, string str,bool isAppand = false) - { - filename = GetApplicationPath() + filename; - var sw = new StreamWriter(filename, isAppand, Encoding.Unicode); - sw.Write(str); - sw.Close(); - } - - - public static string ReadFile(string filename,Encoding encoding= null) - { - if (encoding == null) - encoding = Encoding.Unicode; - filename = GetApplicationPath() + filename; - var sr = new StreamReader(filename, encoding); - var str = sr.ReadToEnd(); - sr.Close(); - return str; - } - } -} \ No newline at end of file diff --git a/CK.SCP.Utils/FormImportDataGrid.Designer.cs b/CK.SCP.Utils/FormImportDataGrid.Designer.cs deleted file mode 100644 index 466d51d..0000000 --- a/CK.SCP.Utils/FormImportDataGrid.Designer.cs +++ /dev/null @@ -1,104 +0,0 @@ -namespace CK.SCP.Utils -{ - partial class FormImportDataGrid - { - /// <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.dgvDetail = new System.Windows.Forms.DataGridView(); - this.panel1 = new System.Windows.Forms.Panel(); - this.btnConfirm = new System.Windows.Forms.Button(); - this.btnCancel = new System.Windows.Forms.Button(); - ((System.ComponentModel.ISupportInitialize)(this.dgvDetail)).BeginInit(); - this.panel1.SuspendLayout(); - this.SuspendLayout(); - // - // dgvDetail - // - this.dgvDetail.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dgvDetail.Dock = System.Windows.Forms.DockStyle.Fill; - this.dgvDetail.Location = new System.Drawing.Point(0, 0); - this.dgvDetail.Name = "dgvDetail"; - this.dgvDetail.RowTemplate.Height = 23; - this.dgvDetail.Size = new System.Drawing.Size(784, 413); - this.dgvDetail.TabIndex = 0; - // - // panel1 - // - this.panel1.Controls.Add(this.btnConfirm); - this.panel1.Controls.Add(this.btnCancel); - this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom; - this.panel1.Location = new System.Drawing.Point(0, 413); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(784, 48); - this.panel1.TabIndex = 1; - // - // btnConfirm - // - this.btnConfirm.Location = new System.Drawing.Point(697, 13); - this.btnConfirm.Name = "btnConfirm"; - this.btnConfirm.Size = new System.Drawing.Size(75, 23); - this.btnConfirm.TabIndex = 2; - this.btnConfirm.Text = "确认导入"; - this.btnConfirm.UseVisualStyleBackColor = true; - this.btnConfirm.Click += new System.EventHandler(this.btnConfirm_Click); - // - // btnCancel - // - this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.btnCancel.Location = new System.Drawing.Point(12, 13); - this.btnCancel.Name = "btnCancel"; - this.btnCancel.Size = new System.Drawing.Size(75, 23); - this.btnCancel.TabIndex = 0; - this.btnCancel.Text = "取消"; - this.btnCancel.UseVisualStyleBackColor = true; - this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); - // - // FormImportDataGrid - // - this.AcceptButton = this.btnConfirm; - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.CancelButton = this.btnCancel; - this.ClientSize = new System.Drawing.Size(784, 461); - this.Controls.Add(this.dgvDetail); - this.Controls.Add(this.panel1); - this.Name = "FormImportDataGrid"; - this.Text = "FormImportDataGrid"; - ((System.ComponentModel.ISupportInitialize)(this.dgvDetail)).EndInit(); - this.panel1.ResumeLayout(false); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.DataGridView dgvDetail; - private System.Windows.Forms.Panel panel1; - private System.Windows.Forms.Button btnConfirm; - private System.Windows.Forms.Button btnCancel; - } -} \ No newline at end of file diff --git a/CK.SCP.Utils/FormImportDataGrid.cs b/CK.SCP.Utils/FormImportDataGrid.cs deleted file mode 100644 index b0919dc..0000000 --- a/CK.SCP.Utils/FormImportDataGrid.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace CK.SCP.Utils -{ - public partial class FormImportDataGrid : Form - { - public FormImportDataGrid(string tablename,DataTable dtSource) - { - InitializeComponent(); - Text = tablename; - dgvDetail.DataSource = dtSource; - } - - public override sealed string Text - { - get { return base.Text; } - set { base.Text = value; } - } - - private void btnConfirm_Click(object sender, EventArgs e) - { - DialogResult = DialogResult.OK; - Close(); - } - - private void btnCancel_Click(object sender, EventArgs e) - { - DialogResult = DialogResult.Cancel; - Close(); - } - } -} diff --git a/CK.SCP.Utils/FormImportDataGrid.resx b/CK.SCP.Utils/FormImportDataGrid.resx deleted file mode 100644 index 1af7de1..0000000 --- a/CK.SCP.Utils/FormImportDataGrid.resx +++ /dev/null @@ -1,120 +0,0 @@ -<?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> \ No newline at end of file diff --git a/CK.SCP.Utils/FormProcess.Designer.cs b/CK.SCP.Utils/FormProcess.Designer.cs deleted file mode 100644 index 234fe1a..0000000 --- a/CK.SCP.Utils/FormProcess.Designer.cs +++ /dev/null @@ -1,80 +0,0 @@ - -namespace CK.SCP.Utils -{ - partial class FormProcess - { - /// <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.labelInfor = new System.Windows.Forms.Label(); - this.SysPBar = new System.Windows.Forms.ProgressBar(); - this.SuspendLayout(); - // - // labelInfor - // - this.labelInfor.AutoSize = true; - this.labelInfor.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.labelInfor.Location = new System.Drawing.Point(35, 19); - this.labelInfor.Name = "labelInfor"; - this.labelInfor.Size = new System.Drawing.Size(170, 21); - this.labelInfor.TabIndex = 0; - this.labelInfor.Text = "读取数据中,请稍候......."; - // - // SysPBar - // - this.SysPBar.Location = new System.Drawing.Point(33, 40); - this.SysPBar.MarqueeAnimationSpeed = 15; - this.SysPBar.Name = "SysPBar"; - this.SysPBar.Size = new System.Drawing.Size(537, 30); - this.SysPBar.Style = System.Windows.Forms.ProgressBarStyle.Marquee; - this.SysPBar.TabIndex = 4; - // - // FormProcess - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.AutoSize = true; - this.BackColor = System.Drawing.SystemColors.ActiveBorder; - this.ClientSize = new System.Drawing.Size(602, 103); - this.Controls.Add(this.SysPBar); - this.Controls.Add(this.labelInfor); - this.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; - this.Name = "FormProcess"; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "进度"; - this.Load += new System.EventHandler(this.FormProcess_Load); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.Label labelInfor; - private System.Windows.Forms.ProgressBar SysPBar; - } -} diff --git a/CK.SCP.Utils/FormProcess.cs b/CK.SCP.Utils/FormProcess.cs deleted file mode 100644 index 35238ee..0000000 --- a/CK.SCP.Utils/FormProcess.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System; -using System.Windows.Forms; - -namespace CK.SCP.Utils -{ - public partial class FormProcess : Form - { - public FormProcess() - { - InitializeComponent(); - } - /// <summary> - /// 设置提示信息 - /// </summary> - public string MessageInfo - { - set { labelInfor.Text = value; } - } - - /// <summary> - /// 设置进度条显示值 - /// </summary> - public int ProcessValue - { - set { SysPBar.Value = value; } - } - - /// <summary> - /// 设置进度条样式 - /// </summary> - public ProgressBarStyle ProcessStyle - { - set { SysPBar.Style = value; } - } - - private void FormProcess_Load(object sender, EventArgs e) - { - SysPBar.Left = 20; - SysPBar.Width = Width - 40; - } - } -} - diff --git a/CK.SCP.Utils/FtpHelper.cs b/CK.SCP.Utils/FtpHelper.cs deleted file mode 100644 index 49a1686..0000000 --- a/CK.SCP.Utils/FtpHelper.cs +++ /dev/null @@ -1,517 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Net; -using System.Text; - -namespace CK.SCP.Utils -{ - - public class FtpHelper - { - string _ftpServer; - string _ftpPort; - string _ftpRootPath; - readonly string _ftpUserId; - readonly string _ftpPassword; - string _ftpUri; - - /// <summary> - /// 连接FTP - /// </summary> - /// <param name="ftpServer">FTP连接地址</param> - /// <param name="ftpPort">FTP端口</param> - /// <param name="ftpRootPath">指定FTP连接成功后的当前目录, 如果不指定即默认为根目录</param> - /// <param name="ftpUserId">用户名</param> - /// <param name="ftpPassword">密码</param> - public FtpHelper(string ftpServer,string ftpPort, string ftpRootPath, string ftpUserId, string ftpPassword) - { - _ftpServer = ftpServer; - _ftpPort = ftpPort; - _ftpRootPath = ftpRootPath; - _ftpUserId = ftpUserId; - _ftpPassword = ftpPassword; - _ftpUri = "ftp://" + _ftpServer +":"+_ftpPort+ "/" + _ftpRootPath + "/"; - } - - public void UploadList(List<string> filenameList) - { - foreach (string filename in filenameList) - { - Upload(filename); - } - } - - /// <summary> - /// 上传 - /// </summary> - /// <param name="filename"></param> - public void Upload(string filename) - { - FileInfo fileInf = new FileInfo(filename); - string uri = _ftpUri + fileInf.Name; - var reqFTP = (FtpWebRequest) FtpWebRequest.Create(new Uri(uri)); - reqFTP.Credentials = new NetworkCredential(_ftpUserId, _ftpPassword); - reqFTP.KeepAlive = false; - reqFTP.Method = WebRequestMethods.Ftp.UploadFile; - reqFTP.UseBinary = true; - reqFTP.ContentLength = fileInf.Length; - int buffLength = 2048; - byte[] buff = new byte[buffLength]; - int contentLen; - using (FileStream fs = fileInf.OpenRead()) - { - using (Stream strm = reqFTP.GetRequestStream()) - { - contentLen = fs.Read(buff, 0, buffLength); - while (contentLen != 0) - { - strm.Write(buff, 0, contentLen); - contentLen = fs.Read(buff, 0, buffLength); - } - strm.Close(); - } - fs.Close(); - } - Console.WriteLine("Upload " + Path.GetFileName(filename)); - - } - - /// <summary> - /// 下载 - /// </summary> - /// <param name="filePath"></param> - /// <param name="fileName"></param> - public void Download(string filePath, string fileName) - { - FtpWebRequest reqFTP; - try - { - FileStream outputStream = new FileStream(filePath + "\\" + fileName, FileMode.Create); - - reqFTP = (FtpWebRequest)FtpWebRequest.Create(new Uri(_ftpUri + fileName)); - reqFTP.Method = WebRequestMethods.Ftp.DownloadFile; - reqFTP.UseBinary = true; - reqFTP.Credentials = new NetworkCredential(_ftpUserId, _ftpPassword); - FtpWebResponse response = (FtpWebResponse)reqFTP.GetResponse(); - Stream ftpStream = response.GetResponseStream(); - long cl = response.ContentLength; - int bufferSize = 2048; - int readCount; - byte[] buffer = new byte[bufferSize]; - - readCount = ftpStream.Read(buffer, 0, bufferSize); - while (readCount > 0) - { - outputStream.Write(buffer, 0, readCount); - readCount = ftpStream.Read(buffer, 0, bufferSize); - } - - ftpStream.Close(); - outputStream.Close(); - response.Close(); - Console.WriteLine("Download " +fileName); - - } - catch (Exception ex) - { - Console.WriteLine( "Download Error --> " + ex.Message); - } - } - - - /// <summary> - /// 删除文件 - /// </summary> - /// <param name="fileName"></param> - public void Delete(string fileName) - { - try - { - string uri = _ftpUri + fileName; - FtpWebRequest reqFTP; - reqFTP = (FtpWebRequest)FtpWebRequest.Create(new Uri(uri)); - - reqFTP.Credentials = new NetworkCredential(_ftpUserId, _ftpPassword); - reqFTP.KeepAlive = false; - reqFTP.Method = WebRequestMethods.Ftp.DeleteFile; - - string result = String.Empty; - FtpWebResponse response = (FtpWebResponse)reqFTP.GetResponse(); - long size = response.ContentLength; - Stream datastream = response.GetResponseStream(); - StreamReader sr = new StreamReader(datastream); - result = sr.ReadToEnd(); - sr.Close(); - datastream.Close(); - response.Close(); - } - catch (Exception ex) - { - Console.WriteLine( "Delete Error --> " + ex.Message + " 文件名:" + fileName); - } - } - - /// <summary> - /// 删除文件夹 - /// </summary> - /// <param name="folderName"></param> - public void RemoveDirectory(string folderName) - { - try - { - string uri = _ftpUri + folderName; - FtpWebRequest reqFTP; - reqFTP = (FtpWebRequest)FtpWebRequest.Create(new Uri(uri)); - - reqFTP.Credentials = new NetworkCredential(_ftpUserId, _ftpPassword); - reqFTP.KeepAlive = false; - reqFTP.Method = WebRequestMethods.Ftp.RemoveDirectory; - - string result = String.Empty; - FtpWebResponse response = (FtpWebResponse)reqFTP.GetResponse(); - long size = response.ContentLength; - Stream datastream = response.GetResponseStream(); - StreamReader sr = new StreamReader(datastream); - result = sr.ReadToEnd(); - sr.Close(); - datastream.Close(); - response.Close(); - } - catch (Exception ex) - { - Console.WriteLine( "Delete Error --> " + ex.Message + " 文件名:" + folderName); - } - } - - /// <summary> - /// 获取当前目录下明细(包含文件和文件夹) - /// </summary> - /// <returns></returns> - public string[] GetFilesDetailList() - { - string[] downloadFiles; - try - { - StringBuilder result = new StringBuilder(); - FtpWebRequest ftp; - ftp = (FtpWebRequest)FtpWebRequest.Create(new Uri(_ftpUri)); - ftp.Credentials = new NetworkCredential(_ftpUserId, _ftpPassword); - ftp.Method = WebRequestMethods.Ftp.ListDirectoryDetails; - WebResponse response = ftp.GetResponse(); - StreamReader reader = new StreamReader(response.GetResponseStream(), Encoding.Default); - - //while (reader.Read() > 0) - //{ - - //} - string line = reader.ReadLine(); - //line = reader.ReadLine(); - //line = reader.ReadLine(); - - while (line != null) - { - result.Append(line); - result.Append("\n"); - line = reader.ReadLine(); - } - result.Remove(result.ToString().LastIndexOf("\n"), 1); - reader.Close(); - response.Close(); - return result.ToString().Split('\n'); - } - catch (Exception ex) - { - downloadFiles = null; - Console.WriteLine( "GetFilesDetailList Error --> " + ex.Message); - return downloadFiles; - } - } - - /// <summary> - /// 获取当前目录下文件列表(仅文件) - /// </summary> - /// <returns></returns> - public string[] GetFileList(string mask) - { - string[] downloadFiles; - StringBuilder result = new StringBuilder(); - FtpWebRequest reqFTP; - try - { - reqFTP = (FtpWebRequest)FtpWebRequest.Create(new Uri(_ftpUri)); - reqFTP.UseBinary = true; - reqFTP.Credentials = new NetworkCredential(_ftpUserId, _ftpPassword); - reqFTP.Method = WebRequestMethods.Ftp.ListDirectory; - WebResponse response = reqFTP.GetResponse(); - StreamReader reader = new StreamReader(response.GetResponseStream(), Encoding.Default); - - string line = reader.ReadLine(); - while (line != null) - { - if (mask.Trim() != string.Empty && mask.Trim() != "*.*") - { - - string mask_ = mask.Substring(0, mask.IndexOf("*")); - if (line.Substring(0, mask_.Length) == mask_) - { - result.Append(line); - result.Append("\n"); - } - } - else - { - result.Append(line); - result.Append("\n"); - } - line = reader.ReadLine(); - } - result.Remove(result.ToString().LastIndexOf('\n'), 1); - reader.Close(); - response.Close(); - return result.ToString().Split('\n'); - } - catch (Exception ex) - { - downloadFiles = null; - if (ex.Message.Trim() != "远程服务器返回错误: (550) 文件不可用(例如,未找到文件,无法访问文件)。") - { - Console.WriteLine( "GetFileList Error --> " + ex.Message.ToString()); - } - return downloadFiles; - } - } - - /// <summary> - /// 获取当前目录下所有的文件夹列表(仅文件夹) - /// </summary> - /// <returns></returns> - public string[] GetDirectoryList() - { - string[] drectory = GetFilesDetailList(); - string m = string.Empty; - foreach (string str in drectory) - { - int dirPos = str.IndexOf("<DIR>"); - if (dirPos > 0) - { - /*判断 Windows 风格*/ - m += str.Substring(dirPos + 5).Trim() + "\n"; - } - else if (str.Trim().Substring(0, 1).ToUpper() == "D") - { - /*判断 Unix 风格*/ - string dir = str.Substring(54).Trim(); - if (dir != "." && dir != "..") - { - m += dir + "\n"; - } - } - } - - char[] n = new char[] { '\n' }; - return m.Split(n); - } - - /// <summary> - /// 判断当前目录下指定的子目录是否存在 - /// </summary> - /// <param name="RemoteDirectoryName">指定的目录名</param> - public bool IsDirectoryExist(string RemoteDirectoryName) - { - string[] dirList = GetDirectoryList(); - foreach (string str in dirList) - { - if (str.Trim() == RemoteDirectoryName.Trim()) - { - return true; - } - } - return false; - } - - /// <summary> - /// 判断当前目录下指定的文件是否存在 - /// </summary> - /// <param name="RemoteFileName">远程文件名</param> - public bool IsFileExist(string RemoteFileName) - { - string[] fileList = GetFileList("*.*"); - foreach (string str in fileList) - { - if (str.Trim() == RemoteFileName.Trim()) - { - return true; - } - } - return false; - } - - /// <summary> - /// 创建文件夹 - /// </summary> - /// <param name="dirName"></param> - public void MakeDir(string dirName) - { - FtpWebRequest reqFTP; - try - { - // dirName = name of the directory to create. - reqFTP = (FtpWebRequest)FtpWebRequest.Create(new Uri(_ftpUri + dirName)); - reqFTP.Method = WebRequestMethods.Ftp.MakeDirectory; - reqFTP.UseBinary = true; - reqFTP.Credentials = new NetworkCredential(_ftpUserId, _ftpPassword); - FtpWebResponse response = (FtpWebResponse)reqFTP.GetResponse(); - Stream ftpStream = response.GetResponseStream(); - - ftpStream.Close(); - response.Close(); - } - catch (Exception ex) - { - Console.WriteLine( "MakeDir Error --> " + ex.Message); - } - } - - /// <summary> - /// 获取指定文件大小 - /// </summary> - /// <param name="filename"></param> - /// <returns></returns> - public long GetFileSize(string filename) - { - FtpWebRequest reqFTP; - long fileSize = 0; - try - { - reqFTP = (FtpWebRequest)FtpWebRequest.Create(new Uri(_ftpUri + filename)); - reqFTP.Method = WebRequestMethods.Ftp.GetFileSize; - reqFTP.UseBinary = true; - reqFTP.Credentials = new NetworkCredential(_ftpUserId, _ftpPassword); - FtpWebResponse response = (FtpWebResponse)reqFTP.GetResponse(); - Stream ftpStream = response.GetResponseStream(); - fileSize = response.ContentLength; - - ftpStream.Close(); - response.Close(); - } - catch (Exception ex) - { - Console.WriteLine( "GetFileSize Error --> " + ex.Message); - } - return fileSize; - } - - /// <summary> - /// 改名 - /// </summary> - /// <param name="currentFilename"></param> - /// <param name="newFilename"></param> - public void Rename(string currentFilename, string newFilename) - { - FtpWebRequest reqFTP; - try - { - reqFTP = (FtpWebRequest)FtpWebRequest.Create(new Uri(_ftpUri + currentFilename)); - reqFTP.Method = WebRequestMethods.Ftp.Rename; - reqFTP.RenameTo = newFilename; - reqFTP.UseBinary = true; - reqFTP.Credentials = new NetworkCredential(_ftpUserId, _ftpPassword); - FtpWebResponse response = (FtpWebResponse)reqFTP.GetResponse(); - Stream ftpStream = response.GetResponseStream(); - - ftpStream.Close(); - response.Close(); - } - catch (Exception ex) - { - Console.WriteLine( "Rename Error --> " + ex.Message); - } - } - - /// <summary> - /// 移动文件 - /// </summary> - /// <param name="currentFilename"></param> - /// <param name="newFilename"></param> - public void MoveFile(string currentFilename, string newDirectory) - { - Rename(currentFilename, newDirectory); - } - - /// <summary> - /// 切换当前目录 - /// </summary> - /// <param name="pathName"></param> - /// <param name="isRoot">true 绝对路径 false 相对路径</param> - public void GotoDirectory(string pathName, bool isRoot) - { - if (isRoot) - { - _ftpUri = "ftp://" + _ftpServer + "/" + pathName + "/"; - } - else - { - _ftpUri = "ftp://" + _ftpServer + "/" + _ftpRootPath + "/" + pathName + "/"; - } - } - - /// <summary> - /// 删除订单目录 - /// </summary> - /// <param name="ftpServerIP">FTP 主机地址</param> - /// <param name="folderToDelete">FTP 用户名</param> - /// <param name="ftpUserID">FTP 用户名</param> - /// <param name="ftpPassword">FTP 密码</param> - public static void DeleteOrderDirectory(string ftpServerIP,string ftpPort, string folderToDelete, string ftpUserID, string ftpPassword) - { - try - { - if (!string.IsNullOrEmpty(ftpServerIP) && !string.IsNullOrEmpty(folderToDelete) && !string.IsNullOrEmpty(ftpUserID) && !string.IsNullOrEmpty(ftpPassword)) - { - FtpHelper fw = new FtpHelper(ftpServerIP,ftpPort, folderToDelete, ftpUserID, ftpPassword); - //进入订单目录 - fw.GotoDirectory(folderToDelete, true); - //获取规格目录 - string[] folders = fw.GetDirectoryList(); - foreach (string folder in folders) - { - if (!string.IsNullOrEmpty(folder) || folder != "") - { - //进入订单目录 - string subFolder = folderToDelete + "/" + folder; - fw.GotoDirectory(subFolder, true); - //获取文件列表 - string[] files = fw.GetFileList("*.*"); - if (files != null) - { - //删除文件 - foreach (string file in files) - { - fw.Delete(file); - } - } - //删除冲印规格文件夹 - fw.GotoDirectory(folderToDelete, true); - fw.RemoveDirectory(folder); - } - } - - //删除订单文件夹 - string parentFolder = folderToDelete.Remove(folderToDelete.LastIndexOf('/')); - string orderFolder = folderToDelete.Substring(folderToDelete.LastIndexOf('/') + 1); - fw.GotoDirectory(parentFolder, true); - fw.RemoveDirectory(orderFolder); - } - else - { - throw new Exception("FTP 及路径不能为空!"); - } - } - catch (Exception ex) - { - throw new Exception("删除订单时发生错误,错误信息为:" + ex.Message); - } - } - } -} \ No newline at end of file diff --git a/CK.SCP.Utils/GzipHelper.cs b/CK.SCP.Utils/GzipHelper.cs deleted file mode 100644 index 2c0a73b..0000000 --- a/CK.SCP.Utils/GzipHelper.cs +++ /dev/null @@ -1,110 +0,0 @@ -using System; -using System.Data; -using System.IO; -using System.IO.Compression; - -namespace CK.SCP.Utils -{ - public class GzipHelper - { - /// <summary> - /// 解压 - /// </summary> - /// <param name="Value"></param> - /// <returns></returns> - public static DataSet GetDatasetByString(string Value) - { - DataSet ds = new DataSet(); - string CC = GZipDecompressString(Value); - System.IO.StringReader Sr = new StringReader(CC); - ds.ReadXml(Sr); - return ds; - } - - /// <summary> - /// 根据DATASET压缩字符串 - /// </summary> - /// <param name="ds"></param> - /// <returns></returns> - public static string GetStringByDataset(string ds) - { - return GZipCompressString(ds); - } - - /// <summary> - /// 将传入字符串以GZip算法压缩后,返回Base64编码字符 - /// </summary> - /// <param name="rawString">需要压缩的字符串</param> - /// <returns>压缩后的Base64编码的字符串</returns> - public static string GZipCompressString(string rawString) - { - if (string.IsNullOrEmpty(rawString) || rawString.Length == 0) - { - return ""; - } - else - { - byte[] rawData = System.Text.Encoding.UTF8.GetBytes(rawString.ToString()); - byte[] zippedData = Compress(rawData); - return (string)(Convert.ToBase64String(zippedData)); - } - } - - /// <summary> - /// GZip压缩 - /// </summary> - /// <param name="rawData"></param> - /// <returns></returns> - static byte[] Compress(byte[] rawData) - { - MemoryStream ms = new MemoryStream(); - GZipStream compressedzipStream = new GZipStream(ms, CompressionMode.Compress, true); - compressedzipStream.Write(rawData, 0, rawData.Length); - compressedzipStream.Close(); - return ms.ToArray(); - } - - - /// <summary> - /// 将传入的二进制字符串资料以GZip算法解压缩 - /// </summary> - /// <param name="zippedString">经GZip压缩后的二进制字符串</param> - /// <returns>原始未压缩字符串</returns> - public static string GZipDecompressString(string zippedString) - { - if (string.IsNullOrEmpty(zippedString) || zippedString.Length == 0) - { - return ""; - } - else - { - byte[] zippedData = Convert.FromBase64String(zippedString.ToString()); - return (string)(System.Text.Encoding.UTF8.GetString(Decompress(zippedData))); - } - } - - - /// <summary> - /// ZIP解压 - /// </summary> - /// <param name="zippedData"></param> - /// <returns></returns> - public static byte[] Decompress(byte[] zippedData) - { - MemoryStream ms = new MemoryStream(zippedData); - GZipStream compressedzipStream = new GZipStream(ms, CompressionMode.Decompress); - MemoryStream outBuffer = new MemoryStream(); - byte[] block = new byte[1024]; - while (true) - { - int bytesRead = compressedzipStream.Read(block, 0, block.Length); - if (bytesRead <= 0) - break; - else - outBuffer.Write(block, 0, bytesRead); - } - compressedzipStream.Close(); - return outBuffer.ToArray(); - } - } -} \ No newline at end of file diff --git a/CK.SCP.Utils/IoHelper.cs b/CK.SCP.Utils/IoHelper.cs deleted file mode 100644 index af29944..0000000 --- a/CK.SCP.Utils/IoHelper.cs +++ /dev/null @@ -1,76 +0,0 @@ -using System; -using System.IO; -using System.Reflection; - -namespace CK.SCP.Utils -{ - public static class IoHelper - { - public static string GetDllPath() - { - return Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); - } - - public static string GetFullPath(string rootPath, string path) - { - if (!Directory.Exists(rootPath)) - Directory.CreateDirectory(rootPath); - if (!rootPath.EndsWith("\\")) - rootPath += "\\"; - var fullPath = rootPath + path; - if (!Directory.Exists(fullPath)) - Directory.CreateDirectory(fullPath); - return rootPath + path; - } - - public static string GetFullFilename(string path, string filename, bool isLocal = true) - { - var str = string.Empty; - if (isLocal) str += GetDllPath() + "\\"; - str += GetPath(path) + "\\" + filename; - return str; - } - - public static string GetPath(string path) - { - if (!Directory.Exists(path)) - { - Directory.CreateDirectory(path); - } - return path; - } - - public static System.Text.Encoding GetFileEncodeType(string filename) - { - System.IO.FileStream fs = new System.IO.FileStream(filename, System.IO.FileMode.Open, - System.IO.FileAccess.Read); - System.IO.BinaryReader br = new System.IO.BinaryReader(fs); - Byte[] buffer = br.ReadBytes(2); - if (buffer[0] >= 0xEF) - { - if (buffer[0] == 0xEF && buffer[1] == 0xBB) - { - return System.Text.Encoding.UTF8; - } - else if (buffer[0] == 0xFE && buffer[1] == 0xFF) - { - return System.Text.Encoding.BigEndianUnicode; - } - else if (buffer[0] == 0xFF && buffer[1] == 0xFE) - { - return System.Text.Encoding.Unicode; - } - else - { - return System.Text.Encoding.Default; - } - } - else - { - return System.Text.Encoding.Default; - } - } - - - } -} diff --git a/CK.SCP.Utils/JsonHelper.cs b/CK.SCP.Utils/JsonHelper.cs deleted file mode 100644 index 1a88cb9..0000000 --- a/CK.SCP.Utils/JsonHelper.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Xml; -using Newtonsoft.Json; -using Formatting = Newtonsoft.Json.Formatting; - -namespace CK.SCP.Utils -{ - public class JsonHelper - { - public static T ReadConfigFromFile<T>(string fileName) where T : new() - { - var t = new T(); - var strData = FileHelper.ReadFile(fileName); - try - { - t = JsonConvert.DeserializeObject<T>(strData); - } - catch (Exception ex) - { - MessageHelper.ShowError($"配置文件{fileName}错误,请重新配置!"); - } - return t; - } - - public static void WriteConfigToFile<T>(string fileName, T t) where T : new() - { - var strData = JsonConvert.SerializeObject(t, Formatting.Indented); - // MessageHelper.ShowInfo(strConfig); - FileHelper.WriteFile(fileName, strData); - - } - } -} \ No newline at end of file diff --git a/CK.SCP.Utils/ListHelper.cs b/CK.SCP.Utils/ListHelper.cs deleted file mode 100644 index ccb0bc7..0000000 --- a/CK.SCP.Utils/ListHelper.cs +++ /dev/null @@ -1,348 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.IO; -using System.Linq; -using System.Reflection; -using System.Runtime.Serialization.Json; -using System.Text; -using System.Windows.Forms; - -namespace CK.SCP.Utils -{ - public static class ListHelper - { - public static T JsonToEntity<T>(string jsonString) - { - using (var ms = new MemoryStream(Encoding.UTF8.GetBytes(jsonString))) - { - var serializer = new DataContractJsonSerializer(typeof(T)); - return (T)serializer.ReadObject(ms); - } - } - - public static string Entity2Json<T>(T model) where T : class - { - using (var ms = new MemoryStream()) - { - var serializer = new DataContractJsonSerializer(typeof(T)); - serializer.WriteObject(ms, model); - ms.Position = 0; - StreamReader sr = new StreamReader(ms, Encoding.UTF8); - string json = sr.ReadToEnd(); - sr.Close(); - ms.Close(); - return json; - } - } - - public static List<T> JsonToList<T>(string jsonString) - { - using (var ms = new MemoryStream(Encoding.UTF8.GetBytes(jsonString))) - { - var serializer = new DataContractJsonSerializer(typeof(T)); - return (List<T>)serializer.ReadObject(ms); - } - } - - public static IList<T> SearchList<T>(IEnumerable<T> tList, string txt) - { - IList<T> selectedList = new List<T>(); - foreach (var t in tList) - { - var a = typeof(T); - var ps = a.GetProperties(); - foreach (PropertyInfo info in ps) - { - object o = info.GetValue(t); - if (o != null && o.ToString().Contains(txt)) - { - selectedList.Add(t); - break; - } - } - } - - return selectedList; - } - - public static IEnumerable<TSource> DistinctBy<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector) - { - HashSet<TKey> seenKeys = new HashSet<TKey>(); - return source.Where(element => seenKeys.Add(keySelector(element))); - } - - public static T DataTableToEntity<T>(DataTable dt) where T : new() - { - var t = new T(); - var tList = DataTableToList<T>(dt); - if (tList.Count > 0) - t = tList[0]; - return t; - } - - public static List<T> DataTableToList<T>(DataTable dt) where T : new() - { - List<T> tList = new List<T>(); - try - { - foreach (DataRow dr in dt.Rows) - { - var t = new T(); - var propertys = t.GetType().GetProperties(); - foreach (var pi in propertys) - { - object value = null; - var piName = pi.Name; - - - if (dt.Columns.Contains(piName)) - { - value = ConvertToType(dr[piName], pi.PropertyType); - } - - if (!pi.CanWrite) continue; - try - { - pi.SetValue(t, value, null); - } - catch (Exception ex) - { - MessageBox.Show(ex.ToString()); - throw; - } - - } - tList.Add(t); - } - - - } - catch (Exception ex) - { - MessageBox.Show(ex.Message); - } - return tList; - } - - public static DataTable EntityToDataTable<T>(T t) where T : new() - { - if(t==null) return new DataTable(); - var tList = new List<T> { t }; - var dt = ListToDataTable(tList, t.GetType().Name); - return dt; - } - - public static DataSet EntityToDataSet<T>(T t) where T : new() - - { - if (t == null) return new DataSet(); - var tList = new List<T> { t }; - var dt = ListToDataTable(tList, t.GetType().Name); - var ds = new DataSet(); - ds.Tables.Add(dt); - return ds; - } - - public static DataSet ListToDataSet<T>(List<T> tList) where T : new() - { - var t = new T(); - var dt = ListToDataTable(tList, t.GetType().Name); - var ds = new DataSet(); - ds.Tables.Add(dt); - return ds; - } - - public static DataTable ListToDataTable<T>(List<T> tList) where T : new() - { - if (tList == null||tList.Count==0) return new DataTable(); - var t = new T(); - var dt = ListToDataTable(tList, t.GetType().Name); - return dt; - } - - public static DataTable ListToDataTable<T>(List<T> tList, string tableName) where T : new() - { - var dt = new DataTable { TableName = tableName }; - if (tList == null || tList.Count == 0) return new DataTable(); - var t = new T(); - var properties = t.GetType().GetProperties(); - foreach (var pi in properties) - { - // The the type of the property - Type columnType = pi.PropertyType; - - // We need to check whether the property is NULLABLE - if (pi.PropertyType.IsGenericType && - pi.PropertyType.GetGenericTypeDefinition() == typeof(Nullable<>)) - { - // If it is NULLABLE, then get the underlying type. eg if "Nullable<int>" then this will return just "int" - columnType = pi.PropertyType.GetGenericArguments()[0]; - } - - // Add the column definition to the datatable. - dt.Columns.Add(new DataColumn(pi.Name, columnType)); - // dc = new DataColumn(columnName,pi.PropertyType); - // dt.Columns.Add(dc); - - } - foreach (var tt in tList) - { - var dr = dt.NewRow(); - foreach (var pi in properties) - { - - var columnName = pi.Name; - try - { - var value = pi.GetValue(tt, null); - dr[columnName] = value ?? DBNull.Value; - } - catch (Exception) - { - dr[columnName] = DBNull.Value; - } - - -// dr[columnName] = pi.GetValue(tt, new object[] {null}) ?? DBNull.Value; - if (pi.PropertyType.FullName == "System.Decimal") - { - dr[columnName] = Math.Round(Convert.ToDecimal(dr[columnName]), 2); - } - - } - dt.Rows.Add(dr); - - - } - - return dt; - } - - public static object ConvertToType(object value, Type convertsionType) - { - object returnValue = ""; - try - { - if (convertsionType.IsGenericType && convertsionType.GetGenericTypeDefinition() == typeof(Nullable<>)) - { - if (value != null && value != DBNull.Value && value.ToString() != "" && value.ToString().Length > 0) - { - var nullableConverter = new NullableConverter(convertsionType); - convertsionType = nullableConverter.UnderlyingType; - returnValue = Convert.ChangeType(value, convertsionType); - } - else - { - returnValue = null; - } - } - else - { - if (value != null && value != DBNull.Value && value.ToString() != "" && value.ToString().Length > 0) - { - if (value.ToString().IndexOf("%", System.StringComparison.Ordinal) == value.ToString().Length - 1) - { - switch (convertsionType.ToString()) - { - case "System.Decimal": - returnValue = Convert.ToDecimal(value.ToString().Replace("%", "")) / 100; - break; - - case "System.Double": - returnValue = Convert.ToDecimal(value.ToString().Replace("%", "")) / 100; - break; - - case "System.Single": - returnValue = Convert.ToDecimal(value.ToString().Replace("%", "")) / 100; - break; - } - } - else if (value.ToString() == "-") - { - returnValue = 0; - } - else - { - returnValue = Convert.ChangeType(value, convertsionType); - if (convertsionType.FullName == "System.Decimal") - returnValue = Math.Round((decimal)returnValue, 5); - if (convertsionType.FullName == "System.String") - returnValue = returnValue.ToString().TrimEnd(); - } - } - else - { - returnValue = GetReturnValue(convertsionType); - } - } - } - catch - { - returnValue = GetReturnValue(convertsionType); - } - return returnValue; - } - - private static object GetReturnValue(Type convertsionType) - { - object returnValue; - switch (convertsionType.ToString()) - { - case "System.Guid": - returnValue = Guid.NewGuid(); - break; - - case "System.DateTime": - returnValue = DateTime.Now; - break; - - case "System.Decimal": - returnValue = 0m; - break; - - case "System.Double": - returnValue = 0.0; - break; - - case " System.UInt16": - returnValue = 0; - break; - - case " System.UInt32": - returnValue = 0; - break; - - case " System.UInt64": - returnValue = 0; - break; - - case "System.Int32": - returnValue = 0; - break; - - case "System.Int16": - returnValue = 0; - break; - - case "System.Int64": - returnValue = 0; - break; - - case "System.String": - returnValue = ""; - break; - - case "System.Single": - returnValue = 0.0f; - break; - - default: - returnValue = ""; - break; - } - return returnValue; - } - } -} \ No newline at end of file diff --git a/CK.SCP.Utils/LogHelper.cs b/CK.SCP.Utils/LogHelper.cs deleted file mode 100644 index e8578e5..0000000 --- a/CK.SCP.Utils/LogHelper.cs +++ /dev/null @@ -1,108 +0,0 @@ -using System; -using System.IO; -using System.Text; -using System.Windows.Forms; - -namespace CK.SCP.Utils -{ - public static class LogHelper - { - - public static string Path = ""; - - public static void Write(string path, string content) - { - try - { - - var strPath = IoHelper.GetDllPath() + "//"+path; - if (!Directory.Exists(strPath)) - { - Directory.CreateDirectory(strPath); - } - string filename = string.Concat(new[] - { - strPath, - "//", - DateTime.Now.ToLongDateString(), - ".txt" - }); - StreamWriter sw = new StreamWriter(filename, true, Encoding.Unicode); - sw.WriteLine(DateTime.Now.ToString("yyyyMMdd")); - sw.WriteLine(content); -// sw.WriteLine("-------------------------------------"); - sw.Close(); - } - catch (Exception ex) - { - MessageBox.Show(ex.ToString()); - } - } - - - public static void Write(string content) - { - try - { - - Path = IoHelper.GetDllPath() + "//Logs"; - if (!Directory.Exists(Path)) - { - Directory.CreateDirectory(Path); - } - string filename = string.Concat(new[] - { - Path, - "//", - DateTime.Now.ToLongDateString(), - ".txt" - }); - StreamWriter sw = new StreamWriter(filename, true, Encoding.Unicode); - sw.WriteLine(DateTime.Now.ToString("HH:mm:ss fff")+"\t"+content); -// sw.WriteLine("-------------------------------------"); - sw.Close(); - } - catch(Exception ex) - { - MessageBox.Show(ex.ToString()); - } - } - - public static void WriteEx(Exception ex) - { - Write(ex.ToString()); - } - - public readonly static log4net.ILog _logInfo = log4net.LogManager.GetLogger("Info"); - public readonly static log4net.ILog _logDebug = log4net.LogManager.GetLogger("Debug"); - public readonly static log4net.ILog _logError = log4net.LogManager.GetLogger("Error"); - - public static void Writlog(LogType p_logtype, Type p_type, string p_methodName, string p_msg) - { - - switch (p_logtype) - { - case LogType.Error: - _logError.ErrorFormat("{0}.{1}:{2}", p_type.FullName, p_methodName, p_msg); - break; - case LogType.Info: - _logInfo.InfoFormat("{0}.{1}:{2}", p_type.FullName, p_methodName, p_msg); - break; - - case LogType.Debug: - _logDebug.DebugFormat("{0}.{1}:{2}", p_type.FullName, p_methodName, p_msg); - break; - } - } - public enum LogType - { - Debug, - Info, - Error - - } - - - - } -} \ No newline at end of file diff --git a/CK.SCP.Utils/MailHelper.cs b/CK.SCP.Utils/MailHelper.cs deleted file mode 100644 index 85df455..0000000 --- a/CK.SCP.Utils/MailHelper.cs +++ /dev/null @@ -1,97 +0,0 @@ -using System.IO; -using System.Net; -using System.Net.Mail; -using System.Net.Mime; -using System.Text; - -namespace CK.SCP.Utils -{ - public class MailHelper - { - private MailMessage mailMessage; - - private SmtpClient smtpClient; - - private string server; - - private string username; - - private string password; - - private bool enablessl; - - private bool credentials; - - private int port; - - public MailHelper(string To, string From, string Body, string Title, string Server, string Username, string Password, bool EnableSsl, int Port, bool Credentials, string AttachmentFile) - { - this.mailMessage = new MailMessage(); - this.mailMessage.To.Add(To); - this.mailMessage.From = new MailAddress(From); - this.mailMessage.Subject = Title; - this.mailMessage.Body = Body; - if (AttachmentFile != "") - { - Attachment attachment = new Attachment(AttachmentFile); - this.mailMessage.Attachments.Add(attachment); - } - this.mailMessage.IsBodyHtml = true; - this.mailMessage.BodyEncoding = Encoding.UTF8; - this.mailMessage.Priority = MailPriority.Normal; - this.server = Server; - this.password = Password; - this.username = Username; - this.enablessl = EnableSsl; - this.port = Port; - this.credentials = Credentials; - } - - public void Send() - { - if (this.mailMessage != null) - { - this.smtpClient = new SmtpClient(); - if (!this.credentials) - { - this.smtpClient.Credentials = new NetworkCredential(this.username, this.password); - } - this.smtpClient.DeliveryMethod = SmtpDeliveryMethod.Network; - this.smtpClient.Host = this.server; - this.smtpClient.Port = this.port; - this.smtpClient.EnableSsl = this.enablessl; - this.smtpClient.Send(this.mailMessage); - } - } - - public void Attachments(string Path) - { - string[] pathArray = Path.Split(new char[] - { - ',' - }); - for (int i = 0; i < pathArray.Length; i++) - { - Attachment data = new Attachment(pathArray[i], "application/octet-stream"); - ContentDisposition disposition = data.ContentDisposition; - disposition.CreationDate = File.GetCreationTime(pathArray[i]); - disposition.ModificationDate = File.GetLastWriteTime(pathArray[i]); - disposition.ReadDate = File.GetLastAccessTime(pathArray[i]); - this.mailMessage.Attachments.Add(data); - } - } - - public void SendAsync(SendCompletedEventHandler completedMethod) - { - if (this.mailMessage != null) - { - this.smtpClient = new SmtpClient(); - this.smtpClient.Credentials = new NetworkCredential(this.mailMessage.From.Address, this.password); - this.smtpClient.DeliveryMethod = SmtpDeliveryMethod.Network; - this.smtpClient.Host = "smtp." + this.mailMessage.From.Host; - this.smtpClient.SendCompleted += completedMethod.Invoke; - this.smtpClient.SendAsync(this.mailMessage, this.mailMessage.Body); - } - } - } -} diff --git a/CK.SCP.Utils/Md5Helper.cs b/CK.SCP.Utils/Md5Helper.cs deleted file mode 100644 index 039fa9f..0000000 --- a/CK.SCP.Utils/Md5Helper.cs +++ /dev/null @@ -1,319 +0,0 @@ -using System; -using System.Collections; -using System.IO; - -namespace CK.SCP.Utils -{ - public class Md5Helper - { - private const int S11 = 7; - - private const int S12 = 12; - - private const int S13 = 17; - - private const int S14 = 22; - - private const int S21 = 5; - - private const int S22 = 9; - - private const int S23 = 14; - - private const int S24 = 20; - - private const int S31 = 4; - - private const int S32 = 11; - - private const int S33 = 16; - - private const int S34 = 23; - - private const int S41 = 6; - - private const int S42 = 10; - - private const int S43 = 15; - - private const int S44 = 21; - - private static uint A; - - private static uint B; - - private static uint C; - - private static uint D; - - private static uint F(uint x, uint y, uint z) - { - return (x & y) | (~x & z); - } - - private static uint G(uint x, uint y, uint z) - { - return (x & z) | (y & ~z); - } - - private static uint H(uint x, uint y, uint z) - { - return x ^ y ^ z; - } - - private static uint I(uint x, uint y, uint z) - { - return y ^ (x | ~z); - } - - private static void FF(ref uint a, uint b, uint c, uint d, uint mj, int s, uint ti) - { - a = a + Md5Helper.F(b, c, d) + mj + ti; - a = (a << s | a >> 32 - s); - a += b; - } - - private static void GG(ref uint a, uint b, uint c, uint d, uint mj, int s, uint ti) - { - a = a + Md5Helper.G(b, c, d) + mj + ti; - a = (a << s | a >> 32 - s); - a += b; - } - - private static void HH(ref uint a, uint b, uint c, uint d, uint mj, int s, uint ti) - { - a = a + Md5Helper.H(b, c, d) + mj + ti; - a = (a << s | a >> 32 - s); - a += b; - } - - private static void II(ref uint a, uint b, uint c, uint d, uint mj, int s, uint ti) - { - a = a + Md5Helper.I(b, c, d) + mj + ti; - a = (a << s | a >> 32 - s); - a += b; - } - - private static void MD5_Init() - { - Md5Helper.A = 1732584193u; - Md5Helper.B = 4023233417u; - Md5Helper.C = 2562383102u; - Md5Helper.D = 271733878u; - } - - private static uint[] MD5_Append(byte[] input) - { - int ones = 1; - int i = input.Length; - int j = i % 64; - int zeros; - int size; - if (j < 56) - { - zeros = 55 - j; - size = i - j + 64; - } - else if (j == 56) - { - zeros = 0; - ones = 0; - size = i + 8; - } - else - { - zeros = 63 - j + 56; - size = i + 64 - j + 64; - } - ArrayList bs = new ArrayList(input); - if (ones == 1) - { - bs.Add(128); - } - for (int k = 0; k < zeros; k++) - { - bs.Add(0); - } - ulong N = (ulong)((long)i * 8L); - byte h = (byte)(N & 255uL); - byte h2 = (byte)(N >> 8 & 255uL); - byte h3 = (byte)(N >> 16 & 255uL); - byte h4 = (byte)(N >> 24 & 255uL); - byte h5 = (byte)(N >> 32 & 255uL); - byte h6 = (byte)(N >> 40 & 255uL); - byte h7 = (byte)(N >> 48 & 255uL); - byte h8 = (byte)(N >> 56); - bs.Add(h); - bs.Add(h2); - bs.Add(h3); - bs.Add(h4); - bs.Add(h5); - bs.Add(h6); - bs.Add(h7); - bs.Add(h8); - byte[] ts = (byte[])bs.ToArray(typeof(byte)); - uint[] output = new uint[size / 4]; - long l = 0L; - long m = 0L; - while (l < (long)size) - { - checked - { - output[(int)((IntPtr)m)] = (uint)((int)ts[(int)((IntPtr)l)] | (int)ts[(int)((IntPtr)(unchecked(l + 1L)))] << 8 | (int)ts[(int)((IntPtr)(unchecked(l + 2L)))] << 16 | (int)ts[(int)((IntPtr)(unchecked(l + 3L)))] << 24); - } - m += 1L; - l += 4L; - } - return output; - } - - private static uint[] MD5_Trasform(uint[] x) - { - for (int i = 0; i < x.Length; i += 16) - { - uint a = Md5Helper.A; - uint b = Md5Helper.B; - uint c = Md5Helper.C; - uint d = Md5Helper.D; - Md5Helper.FF(ref a, b, c, d, x[i], 7, 3614090360u); - Md5Helper.FF(ref d, a, b, c, x[i + 1], 12, 3905402710u); - Md5Helper.FF(ref c, d, a, b, x[i + 2], 17, 606105819u); - Md5Helper.FF(ref b, c, d, a, x[i + 3], 22, 3250441966u); - Md5Helper.FF(ref a, b, c, d, x[i + 4], 7, 4118548399u); - Md5Helper.FF(ref d, a, b, c, x[i + 5], 12, 1200080426u); - Md5Helper.FF(ref c, d, a, b, x[i + 6], 17, 2821735955u); - Md5Helper.FF(ref b, c, d, a, x[i + 7], 22, 4249261313u); - Md5Helper.FF(ref a, b, c, d, x[i + 8], 7, 1770035416u); - Md5Helper.FF(ref d, a, b, c, x[i + 9], 12, 2336552879u); - Md5Helper.FF(ref c, d, a, b, x[i + 10], 17, 4294925233u); - Md5Helper.FF(ref b, c, d, a, x[i + 11], 22, 2304563134u); - Md5Helper.FF(ref a, b, c, d, x[i + 12], 7, 1804603682u); - Md5Helper.FF(ref d, a, b, c, x[i + 13], 12, 4254626195u); - Md5Helper.FF(ref c, d, a, b, x[i + 14], 17, 2792965006u); - Md5Helper.FF(ref b, c, d, a, x[i + 15], 22, 1236535329u); - Md5Helper.GG(ref a, b, c, d, x[i + 1], 5, 4129170786u); - Md5Helper.GG(ref d, a, b, c, x[i + 6], 9, 3225465664u); - Md5Helper.GG(ref c, d, a, b, x[i + 11], 14, 643717713u); - Md5Helper.GG(ref b, c, d, a, x[i], 20, 3921069994u); - Md5Helper.GG(ref a, b, c, d, x[i + 5], 5, 3593408605u); - Md5Helper.GG(ref d, a, b, c, x[i + 10], 9, 38016083u); - Md5Helper.GG(ref c, d, a, b, x[i + 15], 14, 3634488961u); - Md5Helper.GG(ref b, c, d, a, x[i + 4], 20, 3889429448u); - Md5Helper.GG(ref a, b, c, d, x[i + 9], 5, 568446438u); - Md5Helper.GG(ref d, a, b, c, x[i + 14], 9, 3275163606u); - Md5Helper.GG(ref c, d, a, b, x[i + 3], 14, 4107603335u); - Md5Helper.GG(ref b, c, d, a, x[i + 8], 20, 1163531501u); - Md5Helper.GG(ref a, b, c, d, x[i + 13], 5, 2850285829u); - Md5Helper.GG(ref d, a, b, c, x[i + 2], 9, 4243563512u); - Md5Helper.GG(ref c, d, a, b, x[i + 7], 14, 1735328473u); - Md5Helper.GG(ref b, c, d, a, x[i + 12], 20, 2368359562u); - Md5Helper.HH(ref a, b, c, d, x[i + 5], 4, 4294588738u); - Md5Helper.HH(ref d, a, b, c, x[i + 8], 11, 2272392833u); - Md5Helper.HH(ref c, d, a, b, x[i + 11], 16, 1839030562u); - Md5Helper.HH(ref b, c, d, a, x[i + 14], 23, 4259657740u); - Md5Helper.HH(ref a, b, c, d, x[i + 1], 4, 2763975236u); - Md5Helper.HH(ref d, a, b, c, x[i + 4], 11, 1272893353u); - Md5Helper.HH(ref c, d, a, b, x[i + 7], 16, 4139469664u); - Md5Helper.HH(ref b, c, d, a, x[i + 10], 23, 3200236656u); - Md5Helper.HH(ref a, b, c, d, x[i + 13], 4, 681279174u); - Md5Helper.HH(ref d, a, b, c, x[i], 11, 3936430074u); - Md5Helper.HH(ref c, d, a, b, x[i + 3], 16, 3572445317u); - Md5Helper.HH(ref b, c, d, a, x[i + 6], 23, 76029189u); - Md5Helper.HH(ref a, b, c, d, x[i + 9], 4, 3654602809u); - Md5Helper.HH(ref d, a, b, c, x[i + 12], 11, 3873151461u); - Md5Helper.HH(ref c, d, a, b, x[i + 15], 16, 530742520u); - Md5Helper.HH(ref b, c, d, a, x[i + 2], 23, 3299628645u); - Md5Helper.II(ref a, b, c, d, x[i], 6, 4096336452u); - Md5Helper.II(ref d, a, b, c, x[i + 7], 10, 1126891415u); - Md5Helper.II(ref c, d, a, b, x[i + 14], 15, 2878612391u); - Md5Helper.II(ref b, c, d, a, x[i + 5], 21, 4237533241u); - Md5Helper.II(ref a, b, c, d, x[i + 12], 6, 1700485571u); - Md5Helper.II(ref d, a, b, c, x[i + 3], 10, 2399980690u); - Md5Helper.II(ref c, d, a, b, x[i + 10], 15, 4293915773u); - Md5Helper.II(ref b, c, d, a, x[i + 1], 21, 2240044497u); - Md5Helper.II(ref a, b, c, d, x[i + 8], 6, 1873313359u); - Md5Helper.II(ref d, a, b, c, x[i + 15], 10, 4264355552u); - Md5Helper.II(ref c, d, a, b, x[i + 6], 15, 2734768916u); - Md5Helper.II(ref b, c, d, a, x[i + 13], 21, 1309151649u); - Md5Helper.II(ref a, b, c, d, x[i + 4], 6, 4149444226u); - Md5Helper.II(ref d, a, b, c, x[i + 11], 10, 3174756917u); - Md5Helper.II(ref c, d, a, b, x[i + 2], 15, 718787259u); - Md5Helper.II(ref b, c, d, a, x[i + 9], 21, 3951481745u); - Md5Helper.A += a; - Md5Helper.B += b; - Md5Helper.C += c; - Md5Helper.D += d; - } - return new uint[] - { - Md5Helper.A, - Md5Helper.B, - Md5Helper.C, - Md5Helper.D - }; - } - - public static byte[] MD5Array(byte[] input) - { - Md5Helper.MD5_Init(); - uint[] block = Md5Helper.MD5_Append(input); - uint[] bits = Md5Helper.MD5_Trasform(block); - byte[] output = new byte[bits.Length * 4]; - int i = 0; - int j = 0; - while (i < bits.Length) - { - output[j] = (byte)(bits[i] & 255u); - output[j + 1] = (byte)(bits[i] >> 8 & 255u); - output[j + 2] = (byte)(bits[i] >> 16 & 255u); - output[j + 3] = (byte)(bits[i] >> 24 & 255u); - i++; - j += 4; - } - return output; - } - - public static string ArrayToHexString(byte[] array, bool uppercase) - { - string hexString = ""; - string format = "x2"; - if (uppercase) - { - format = "X2"; - } - for (int i = 0; i < array.Length; i++) - { - byte b = array[i]; - hexString += b.ToString(format); - } - return hexString; - } - - public static string MDString(string message) - { - char[] c = message.ToCharArray(); - byte[] b = new byte[c.Length]; - for (int i = 0; i < c.Length; i++) - { - b[i] = (byte)c[i]; - } - byte[] digest = Md5Helper.MD5Array(b); - return Md5Helper.ArrayToHexString(digest, false); - } - - public static string MDFile(string fileName) - { - FileStream fs = File.Open(fileName, FileMode.Open, FileAccess.Read); - byte[] array = new byte[fs.Length]; - fs.Read(array, 0, (int)fs.Length); - byte[] digest = Md5Helper.MD5Array(array); - fs.Close(); - return Md5Helper.ArrayToHexString(digest, false); - } - - public static string Test(string message) - { - return Md5Helper.MDString(message); - } - } -} diff --git a/CK.SCP.Utils/MessageHelper.cs b/CK.SCP.Utils/MessageHelper.cs deleted file mode 100644 index ad4a13e..0000000 --- a/CK.SCP.Utils/MessageHelper.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Windows.Forms; - -namespace CK.SCP.Utils -{ - public static class MessageHelper - { - public static void ShowError(Exception ex) - { - MessageBox.Show(ex.Message, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); - LogHelper.Write(ex.ToString()); - } - - public static void ShowError(string msg) - { - MessageBox.Show(msg, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); - LogHelper.Write(msg); - } - public static DialogResult ShowWarning(string msg) - { - return MessageBox.Show(msg, "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); - } - public static DialogResult ShowQuestion(string msg) - { - return MessageBox.Show(msg, "问题", MessageBoxButtons.YesNo, MessageBoxIcon.Question); - } - - public static void ShowInfo(string msg) - { - MessageBox.Show(msg, "信息", MessageBoxButtons.OK, MessageBoxIcon.Information); - } - } -} diff --git a/CK.SCP.Utils/PredicateBuilder.cs b/CK.SCP.Utils/PredicateBuilder.cs deleted file mode 100644 index 71f44f2..0000000 --- a/CK.SCP.Utils/PredicateBuilder.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; -using System.Linq; -using System.Linq.Expressions; - -namespace CK.SCP.Utils -{ - public static class PredicateBuilder - { - - /// <summary> - /// 机关函数应用True时:单个AND有效,多个AND有效;单个OR无效,多个OR无效;混应时写在AND后的OR有效 - /// </summary> - /// <typeparam name="T"></typeparam> - /// <returns></returns> - public static Expression<Func<T, bool>> True<T>() { return f => true; } - - /// <summary> - /// 机关函数应用False时:单个AND无效,多个AND无效;单个OR有效,多个OR有效;混应时写在OR后面的AND有效 - /// </summary> - /// <typeparam name="T"></typeparam> - /// <returns></returns> - public static Expression<Func<T, bool>> False<T>() { return f => false; } - - public static Expression<Func<T, bool>> Or<T>(this Expression<Func<T, bool>> expr1, - Expression<Func<T, bool>> expr2) - { - var invokedExpr = Expression.Invoke(expr2, expr1.Parameters.Cast<Expression>()); - return Expression.Lambda<Func<T, bool>> - (Expression.Or(expr1.Body, invokedExpr), expr1.Parameters); - } - - public static Expression<Func<T, bool>> And<T>(this Expression<Func<T, bool>> expr1, - Expression<Func<T, bool>> expr2) - { - var invokedExpr = Expression.Invoke(expr2, expr1.Parameters.Cast<Expression>()); - return Expression.Lambda<Func<T, bool>> - (Expression.And(expr1.Body, invokedExpr), expr1.Parameters); - } - } -} \ No newline at end of file diff --git a/CK.SCP.Utils/ProcessOperator.cs b/CK.SCP.Utils/ProcessOperator.cs deleted file mode 100644 index ce15ce8..0000000 --- a/CK.SCP.Utils/ProcessOperator.cs +++ /dev/null @@ -1,292 +0,0 @@ -using System; -using System.ComponentModel; -using System.Windows.Forms; - -namespace CK.SCP.Utils -{ - public class ProcessOperator - { - private readonly BackgroundWorker _backgroundWorker;//后台线程 - private readonly FormProcess _processForm;//进度条窗体 - private readonly BackgroundWorkerEventArgs _eventArgs;//异常参数 - public ProcessOperator() - { - _backgroundWorker = new BackgroundWorker(); - _processForm = new FormProcess(); - _eventArgs = new BackgroundWorkerEventArgs(); - _backgroundWorker.DoWork += _backgroundWorker_DoWork; - _backgroundWorker.RunWorkerCompleted += _backgroundWorker_RunWorkerCompleted; - } - - //操作进行完毕后关闭进度条窗体 - private void _backgroundWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) - { - if (_processForm.Visible == true) - { - _processForm.Close(); - } - if (this.BackgroundWorkerCompleted != null) - { - this.BackgroundWorkerCompleted(null, _eventArgs); - } - } - - //后台执行的操作 - private void _backgroundWorker_DoWork(object sender, DoWorkEventArgs e) - { - if (BackgroundWork == null) return; - try - { - BackgroundWork(); - } - catch (Exception ex) - { - _eventArgs.BackGroundException = ex; - MessageBox.Show(ex.ToString()); - } - } - - #region 公共方法、属性、事件 - - /// <summary> - /// 后台执行的操作 - /// </summary> - public Action BackgroundWork { get; set; } - - /// <summary> - /// 设置进度条显示的提示信息 - /// </summary> - public string MessageInfo - { - set { _processForm.MessageInfo = value; } - } - - /// <summary> - /// 后台任务执行完毕后事件 - /// </summary> - public event EventHandler<BackgroundWorkerEventArgs> BackgroundWorkerCompleted; - - /// <summary> - /// 开始执行 - /// </summary> - public void Start() - { - _backgroundWorker.RunWorkerAsync(); - _processForm.ShowDialog(); - } - - #endregion - } -} - - -/* - private void CreateWorksheet(Application excel, Worksheet sheet, DataTable dt, string fileName) - { - Range r = null; - int rIdx = RStartIndex; - int cIdx = CStartIndex; - if (!string.IsNullOrEmpty(dt.TableName)) - { - sheet.Name = dt.TableName; - } - - // - //取得标题 - // - foreach (DataColumn dc in dt.Columns) - { - cIdx++; - excel.Cells[rIdx, cIdx] = dc.ColumnName; - //设置标题格式为居中对齐 - r = sheet.Range[excel.Cells[rIdx, cIdx], excel.Cells[rIdx, cIdx]]; - r.HorizontalAlignment = XlVAlign.xlVAlignCenter; - r.Interior.ColorIndex = 37; - } - - //因为第一行已经写了表头,所以所有数据都应该从a2开始 - r = sheet.Range[excel.Cells[rIdx, cIdx], excel.Cells[rIdx, cIdx]]; - - WriteData(dt, sheet); - - int rSumIdx = dt.Rows.Count + 1; - int cSumIdx = CStartIndex + 1; - - - // - //设置报表表格为最适应宽度 - // - r = sheet.Range[excel.Cells[RStartIndex, cSumIdx], excel.Cells[rSumIdx, cIdx]]; - r.Select(); - r.Columns.AutoFit(); - - - // - //绘制边框 - // - r = sheet.Range[excel.Cells[RStartIndex, cSumIdx], excel.Cells[rSumIdx, cIdx]]; - r.Borders.LineStyle = 1; - - r = sheet.Range[excel.Cells[RStartIndex, cSumIdx], excel.Cells[rSumIdx, cSumIdx]]; - r.Borders[XlBordersIndex.xlEdgeLeft].Weight = XlBorderWeight.xlThick; //设置左边线加粗 - - r = sheet.Range[excel.Cells[RStartIndex, cSumIdx], excel.Cells[RStartIndex, cIdx]]; - r.Borders[XlBordersIndex.xlEdgeTop].Weight = XlBorderWeight.xlThick; //设置上边线加粗 - - r = sheet.Range[excel.Cells[RStartIndex, cIdx], excel.Cells[rSumIdx, cIdx]]; - r.Borders[XlBordersIndex.xlEdgeRight].Weight = XlBorderWeight.xlThick; //设置右边线加粗 - - r = sheet.Range[excel.Cells[rSumIdx, cSumIdx], excel.Cells[rSumIdx, cIdx]]; - r.Borders[XlBordersIndex.xlEdgeBottom].Weight = XlBorderWeight.xlThick; //设置下边线加粗 - - - r = sheet.Range[excel.Cells[0, 0], null]; - - // - //显示效果 - // - excel.Visible = false; - excel.DisplayAlerts = false; - excel.AlertBeforeOverwriting = false; - } - - private void AddWorksheet(Application excel, Worksheet sheet, DataTable dt, string fileName) - { - Range r = null; - int rIdx = RStartIndex; - int cIdx = CStartIndex; - if (!string.IsNullOrEmpty(dt.TableName)) - { - sheet.Name = dt.TableName; - } - - // - //取得标题 - // - foreach (DataColumn dc in dt.Columns) - { - cIdx++; - excel.Cells[rIdx, cIdx] = dc.ColumnName; - //设置标题格式为居中对齐 - r = sheet.Range[excel.Cells[rIdx, cIdx], excel.Cells[rIdx, cIdx]]; - r.HorizontalAlignment = XlVAlign.xlVAlignCenter; - r.Interior.ColorIndex = 37; - } - - //因为第一行已经写了表头,所以所有数据都应该从a2开始 - r = sheet.Range[excel.Cells[rIdx, cIdx], excel.Cells[rIdx, cIdx]]; - WriteData(dt, sheet); - - - int rSumIdx = dt.Rows.Count + 1; - int cSumIdx = CStartIndex + 1; - // - //设置报表表格为最适应宽度 - // - r = sheet.Range[excel.Cells[RStartIndex, cSumIdx], excel.Cells[rSumIdx, cIdx]]; - r.Select(); - r.Columns.AutoFit(); - - // - //绘制边框 - // - r = sheet.Range[excel.Cells[RStartIndex, cSumIdx], excel.Cells[rSumIdx, cIdx]]; - r.Borders.LineStyle = 1; - - - r = sheet.Range[excel.Cells[RStartIndex, cSumIdx], excel.Cells[rSumIdx, cSumIdx]]; - r.Borders[XlBordersIndex.xlEdgeLeft].Weight = XlBorderWeight.xlThick; //设置左边线加粗 - - r = sheet.Range[excel.Cells[RStartIndex, cSumIdx], excel.Cells[RStartIndex, cIdx]]; - r.Borders[XlBordersIndex.xlEdgeTop].Weight = XlBorderWeight.xlThick; //设置上边线加粗 - - r = sheet.Range[excel.Cells[RStartIndex, cIdx], excel.Cells[rSumIdx, cIdx]]; - r.Borders[XlBordersIndex.xlEdgeRight].Weight = XlBorderWeight.xlThick; //设置右边线加粗 - - r = sheet.Range[excel.Cells[rSumIdx, cSumIdx], excel.Cells[rSumIdx, cIdx]]; - r.Borders[XlBordersIndex.xlEdgeBottom].Weight = XlBorderWeight.xlThick; //设置下边线加粗 - // - //显示效果 - // - r = sheet.Range[excel.Cells[0, 0], null]; - excel.Visible = false; - excel.DisplayAlerts = false; - excel.AlertBeforeOverwriting = false; - } - -*/ - - -//1、全表自动列宽 - -// mysheet.Cells.Select(); - -// mysheet.Cells.Columns.AutoFit(); - -// 2、合并 - -// excelRangeParm.Merge(Missing.Value); - -// 3、粗体设置 - -// excelRangeParm.Font.Bold = true; - -// 4、字体大小设置 - -// excelRangeParm.Font.Size = 12; - -// 5、水平对齐设置 - -// excelRangeParm.HorizontalAlignment = Excel.XlHAlign.xlHAlignCenter; - -// 6、垂直对齐设置 - -// excelRangeParm.VerticalAlignment = Excel.XlVAlign.xlVAlignCenter; - -// 7、公式设置 - -// excelRangeParm.FormulaR1C1 = 公式; - -// 8、列宽设置 - -// excelRange.ColumnWidth = 宽度; - -// 9、行高 - -// excelRange.RowHeight = 行高; - -// 10、设置列格式 - -// Excel.Range myrange=mysheet.get_Range(mysheet.Cells[1,1],mysheet.Cells[5,1]); - -// 11、文本格式 - -// myrange.NumberFormatLocal="@"; - -// 12、通用格式 - -// style.NumberFormatLocal = "[DBNum2][$-804]G/通用格式"; - -// 或 - -// range.NumberFormatLocal = "G/通用格式"; - -// xlsheet.Cells[1,1]="''+txtKey.Text; - -// 13、添加行 - -// ((Excel.Range)mysheet.Cells[15,3]).EntireRow.Insert(0); - -// 14、设置第10行为红色 - -// mysheet.get_Range((Excel.Range)mysheet.Cells[10,1],(Excel.Range)mysheet.Cells[10,200]).Select(); - -// mysheet.get_Range((Excel.Range)mysheet.Cells[10,1],(Excel.Range)mysheet.Cells[10,200]).Interior.ColorIndex=3; - -//15、单元格自动换行 - -//myrange.WrapText = true; - -//16、单元格行高自动调整 - -//myrange.EntireRow.AutoFit(); \ No newline at end of file diff --git a/CK.SCP.Utils/ProgramHelper.cs b/CK.SCP.Utils/ProgramHelper.cs deleted file mode 100644 index 07b0bab..0000000 --- a/CK.SCP.Utils/ProgramHelper.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System.Windows.Forms; - -namespace CK.SCP.Utils -{ - public class ProgramHelper - { - public static bool HasExist() - { - bool notExist; - System.Threading.Mutex run = new System.Threading.Mutex(true, Application.ProductName, out notExist); //核心代码 - if (notExist) return false; - MessageBox.Show(Application.ProductName + "已运行,无法重复启动。"); - return true; - } - } -} \ No newline at end of file diff --git a/CK.SCP.Utils/Properties/AssemblyInfo.cs b/CK.SCP.Utils/Properties/AssemblyInfo.cs deleted file mode 100644 index 4862f84..0000000 --- a/CK.SCP.Utils/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// 有关程序集的一般信息由以下 -// 控制。更改这些特性值可修改 -// 与程序集关联的信息。 -[assembly: AssemblyTitle("CK.SCP.Utils")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("CK.SCP.Utils")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2018")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -//将 ComVisible 设置为 false 将使此程序集中的类型 -//对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型, -//请将此类型的 ComVisible 特性设置为 true。 -[assembly: ComVisible(false)] - -// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID -[assembly: Guid("7118ac83-9dc0-41f5-94ea-e6f405ae0448")] - -// 程序集的版本信息由下列四个值组成: -// -// 主版本 -// 次版本 -// 生成号 -// 修订号 -// -//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, -// 方法是按如下所示使用“*”: : -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/CK.SCP.Utils/TraceLogger.cs b/CK.SCP.Utils/TraceLogger.cs deleted file mode 100644 index d9df518..0000000 --- a/CK.SCP.Utils/TraceLogger.cs +++ /dev/null @@ -1,512 +0,0 @@ -using System; -using System.Data.SqlClient; -using System.Diagnostics; -using System.IO; - -namespace CK.SCP.Utils - -{ - - /// <summary> - - /// 日志类 - - /// </summary> - - public sealed class TraceLogger - - { - - #region Member Variables - - - - /// <summary> - - /// 用于Trace的组织输出的类别名称 - - /// </summary> - - private const string trace_sql = "\r\n***********************TRACE_SQL {0}*****************************\r\nTRACE_SQL"; - - - - /// <summary> - - /// 用于Trace的组织输出的类别名称 - - /// </summary> - - private const string trace_exception = "\r\n***********************TRACE_EXCEPTION {0}***********************"; - - - - /// <summary> - - /// 当前日志的日期 - - /// </summary> - - private static DateTime CurrentLogFileDate = DateTime.Now; - - - - /// <summary> - - /// 日志对象 - - /// </summary> - - private static TextWriterTraceListener twtl; - - - - /// <summary> - - /// 日志根目录 - - /// </summary> - - private const string log_root_directory = @"//Logs"; - - - - /// <summary> - - /// 日志子目录 - - /// </summary> - - private static string log_subdir; - - - - - - /// <summary> - - /// " {0} = {1}" - - /// </summary> - - private const string FORMAT_TRACE_PARAM = " {0} = {1}"; - - - - /// <summary> - - /// 1 仅控制台输出 - - /// 2 仅日志输出 - - /// 3 控制台+日志输出 - - /// </summary> - - private static readonly int flag = 2; //可以修改成从配置文件读取 - - - - #endregion - - - - #region Constructor - - - - static TraceLogger() - - { - - System.Diagnostics.Trace.AutoFlush = true; - - - - switch (flag) - - { - - case 1: - - System.Diagnostics.Trace.Listeners.Add(new ConsoleTraceListener()); - - break; - - case 2: - - System.Diagnostics.Trace.Listeners.Add(TWTL); - - break; - - case 3: - - System.Diagnostics.Trace.Listeners.Add(new ConsoleTraceListener()); - - System.Diagnostics.Trace.Listeners.Add(TWTL); - - break; - - } - - } - - - - #endregion - - - - #region Method - - - - #region trace - - - - /// <summary> - - /// 异步错误日志 - - /// </summary> - - /// <param name="value"></param> - - public static void Trace(Exception ex) - - { - - new AsyncLogException(BeginTraceError).BeginInvoke(ex, null, null); - - } - - - - /// <summary> - - /// 异步SQL日志 - - /// </summary> - - /// <param name="cmd"></param> - - public static void Trace(SqlCommand cmd) - - { - - new AsyncLogSqlCommand(BeginTraceSqlCommand).BeginInvoke(cmd, null, null); - - } - - - - /// <summary> - - /// 异步SQL日志 - - /// </summary> - - /// <param name="sql"></param> - - /// <param name="parameter"></param> - - public static void Trace(string sql, params SqlParameter[] parameter) - - { - - new AsyncLogSql(BeginTraceSql).BeginInvoke(sql, parameter, null, null); - - } - - - - #endregion - - - - #region delegate - - - - private delegate void AsyncLogException(Exception ex); - - private delegate void AsyncLogSqlCommand(SqlCommand cmd); - - private delegate void AsyncLogSql(string sql, params SqlParameter[] parameter); - - - - private static void BeginTraceError(Exception ex) - - { - - if (null != ex) - - { - - //检测日志日期 - - StrategyLog(); - - - - //输出日志头 - - System.Diagnostics.Trace.WriteLine(string.Format(trace_exception, DateTime.Now)); - - while (null != ex) - - { - - System.Diagnostics.Trace.WriteLine(string.Format("{0} {1}\r\n{2}\r\nSource:{3}", ex.GetType().Name, ex.Message, ex.StackTrace, ex.Source)); - - ex = ex.InnerException; - - } - - } - - } - - - - private static void BeginTraceSqlCommand(SqlCommand cmd) - - { - - if (null != cmd) - - { - - SqlParameter[] parameter = new SqlParameter[cmd.Parameters.Count]; - - cmd.Parameters.CopyTo(parameter, 0); - - BeginTraceSql(cmd.CommandText, parameter); - - } - - } - - - - private static void BeginTraceSql(string sql, params SqlParameter[] parameter) - - { - - if (!string.IsNullOrEmpty(sql)) - - { - - //检测日志日期 - - StrategyLog(); - - - - System.Diagnostics.Trace.WriteLine(sql, string.Format(trace_sql, DateTime.Now)); - - if (parameter != null) - - { - - foreach (SqlParameter param in parameter) - - { - - System.Diagnostics.Trace.WriteLine(string.Format(FORMAT_TRACE_PARAM, param.ParameterName, param.Value)); - - } - - } - - } - - } - - - - #endregion - - - - #region helper - - - - /// <summary> - - /// 根据日志策略生成日志 - - /// </summary> - - private static void StrategyLog() - - { - - //判断日志日期 - - if (DateTime.Compare(DateTime.Now.Date, CurrentLogFileDate.Date) != 0) - - { - - DateTime currentDate = DateTime.Now.Date; - - - - //生成子目录 - - BuiderDir(currentDate); - - //更新当前日志日期 - - CurrentLogFileDate = currentDate; - - - - System.Diagnostics.Trace.Flush(); - - - - //更改输出 - - if (twtl != null) - - System.Diagnostics.Trace.Listeners.Remove(twtl); - - - - System.Diagnostics.Trace.Listeners.Add(TWTL); - - } - - } - - - - /// <summary> - - /// 根据年月生成子目录 - - /// </summary> - - /// <param name="currentDate"></param> - - private static void BuiderDir(DateTime currentDate) - - { - - int year = currentDate.Year; - - int month = currentDate.Month; - - //年/月 - - string subdir = string.Concat(year, '\\', month); - - string path = Path.Combine(log_root_directory, subdir); - - if (!Directory.Exists(path)) - - { - - Directory.CreateDirectory(path); - - } - - log_subdir = subdir; - - } - - - - #endregion - - - - #endregion - - - - #region Properties - - - - /// <summary> - - /// 日志文件路径 - - /// </summary> - - /// <returns></returns> - - private static string GetLogFullPath - - { - - get - - { - - return string.Concat(log_root_directory, '\\', string.Concat(log_subdir, @"\log", CurrentLogFileDate.ToShortDateString(), ".txt")); - - } - - } - - - - /// <summary> - - /// 跟踪输出日志文件 - - /// </summary> - - private static TextWriterTraceListener TWTL - - { - - get - - { - - if (twtl == null) - - { - - if (string.IsNullOrEmpty(log_subdir)) - - BuiderDir(DateTime.Now); - - else - - { - - string logPath = GetLogFullPath; - - if (!Directory.Exists(Path.GetDirectoryName(logPath))) - - BuiderDir(DateTime.Now); - - } - - twtl = new TextWriterTraceListener(GetLogFullPath); - - } - - return twtl; - - } - - } - - - - #endregion - - - - } - -} \ No newline at end of file diff --git a/CK.SCP.Utils/XmlHelper.cs b/CK.SCP.Utils/XmlHelper.cs deleted file mode 100644 index 93e9930..0000000 --- a/CK.SCP.Utils/XmlHelper.cs +++ /dev/null @@ -1,219 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Xml; - -namespace CK.SCP.Utils -{ - /// <summary> - /// 实体转Xml,Xml转实体类 - /// </summary> - /// <typeparam name="T"></typeparam> - public class XmlHelper<T> where T : new() - { - #region 实体类转成Xml - - /// <summary> - /// 对象实例转成xml - /// </summary> - /// <param name="item">对象实例</param> - /// <returns></returns> - public static string EntityToXml(T item) - { - IList<T> items = new List<T>(); - items.Add(item); - return EntityToXml(items); - } - - /// <summary> - /// 对象实例集转成xml - /// </summary> - /// <param name="items">对象实例集</param> - /// <returns></returns> - public static string EntityToXml(IList<T> items) - { - //创建XmlDocument文档 - XmlDocument doc = new XmlDocument(); - //创建根元素 - XmlElement root = doc.CreateElement(typeof(T).Name + "s"); - //添加根元素的子元素集 - foreach (T item in items) - { - EntityToXml(doc, root, item); - } - //向XmlDocument文档添加根元素 - doc.AppendChild(root); - - return doc.InnerXml; - } - - private static void EntityToXml(XmlDocument doc, XmlElement root, T item) - { - //创建元素 - XmlElement xmlItem = doc.CreateElement(typeof(T).Name); - //对象的属性集 - - System.Reflection.PropertyInfo[] propertyInfo = - typeof(T).GetProperties(System.Reflection.BindingFlags.Public | - System.Reflection.BindingFlags.Instance); - - - - foreach (System.Reflection.PropertyInfo pinfo in propertyInfo) - { - if (pinfo != null) - { - //对象属性名称 - string name = pinfo.Name; - //对象属性值 - string value = String.Empty; - - if (pinfo.GetValue(item, null) != null) - value = pinfo.GetValue(item, null).ToString(); //获取对象属性值 - //设置元素的属性值 - xmlItem.SetAttribute(name, value); - } - } - //向根添加子元素 - root.AppendChild(xmlItem); - } - - - #endregion - - #region Xml转成实体类 - - /// <summary> - /// Xml转成对象实例 - /// </summary> - /// <param name="xml">xml</param> - /// <returns></returns> - public static T XmlToEntity(string xml) - { - IList<T> items = XmlToEntityList(xml); - if (items != null && items.Count > 0) - return items[0]; - else return default(T); - } - - /// <summary> - /// Xml转成对象实例集 - /// </summary> - /// <param name="xml">xml</param> - /// <returns></returns> - public static IList<T> XmlToEntityList(string xml) - { - XmlDocument doc = new XmlDocument(); - try - { - doc.LoadXml(xml); - } - catch - { - return null; - } - if (doc.ChildNodes.Count != 1) - return null; - if (doc.ChildNodes[0].Name.ToLower() != typeof(T).Name.ToLower() + "s") - return null; - - XmlNode node = doc.ChildNodes[0]; - - IList<T> items = new List<T>(); - - foreach (XmlNode child in node.ChildNodes) - { - if (child.Name.ToLower() == typeof(T).Name.ToLower()) - items.Add(XmlNodeToEntity(child)); - } - - return items; - } - - private static T XmlNodeToEntity(XmlNode node) - { - T item = new T(); - - if (node.NodeType == XmlNodeType.Element) - { - XmlElement element = (XmlElement)node; - - System.Reflection.PropertyInfo[] propertyInfo = - typeof(T).GetProperties(System.Reflection.BindingFlags.Public | - System.Reflection.BindingFlags.Instance); - - foreach (XmlAttribute attr in element.Attributes) - { - string attrName = attr.Name.ToLower(); - string attrValue = attr.Value.ToString(); - foreach (System.Reflection.PropertyInfo pInfo in propertyInfo) - { - if (pInfo == null) continue; - var name = pInfo.Name.ToLower(); - var dbType = pInfo.PropertyType; - if (name != attrName) continue; - if (String.IsNullOrEmpty(attrValue))continue; - - if (!pInfo.PropertyType.IsGenericType) - { - pInfo.SetValue(item, string.IsNullOrEmpty(attrValue) ? null : Convert.ChangeType(attrValue, pInfo.PropertyType,null), null); - } - else - { - //泛型Nullable<> - Type genericTypeDefinition = pInfo.PropertyType.GetGenericTypeDefinition(); - if (genericTypeDefinition == typeof(Nullable<>)) - { - pInfo.SetValue(item, string.IsNullOrEmpty(attrValue) ? null : Convert.ChangeType(attrValue, Nullable.GetUnderlyingType(pInfo.PropertyType),null), null); - } - } -/*原来的方法 - if (dbType.IsGenericType && dbType.GetGenericTypeDefinition() == typeof(Nullable<>))//判断convertsionType是否为nullable泛型类 - { - if (dbType.FullName.IndexOf("System.Int32", System.StringComparison.Ordinal) > 0) - dbType = typeof(System.Int32); - if (dbType.FullName.IndexOf("System.Boolean", System.StringComparison.Ordinal) > 0) - dbType = typeof(System.Boolean); - if (dbType.FullName.IndexOf("System.DateTime", System.StringComparison.Ordinal) > 0) - dbType = typeof(System.DateTime); - if (dbType.FullName.IndexOf("System.Decimal", System.StringComparison.Ordinal) > 0) - dbType = typeof(System.Decimal); - if (dbType.FullName.IndexOf("System.Double", System.StringComparison.Ordinal) > 0) - dbType = typeof(System.Double); - if (dbType.FullName.IndexOf("System.String", System.StringComparison.Ordinal) > 0) - dbType = typeof(System.String); -//WinCe下此段不可用 -// //如果type为nullable类,声明一个NullableConverter类,该类提供从Nullable类到基础基元类型的转换 -// System.ComponentModel.NullableConverter nullableConverter = new System.ComponentModel.NullableConverter(dbType); -// //将type转换为nullable对的基础基元类型 -// dbType = nullableConverter.UnderlyingType; - } - switch (dbType.ToString()) - { - case "System.Int32": - pInfo.SetValue(item, Convert.ToInt32(attrValue), null); - break; - case "System.Boolean": - pInfo.SetValue(item, Convert.ToBoolean(attrValue), null); - break; - case "System.DateTime": - pInfo.SetValue(item, Convert.ToDateTime(attrValue), null); - break; - case "System.Decimal": - pInfo.SetValue(item, Convert.ToDecimal(attrValue), null); - break; - case "System.Double": - pInfo.SetValue(item, Convert.ToDouble(attrValue), null); - break; - default: - pInfo.SetValue(item, attrValue, null); - break; - }*/ - } - } - } - return item; - } - - #endregion - } -} \ No newline at end of file diff --git a/CK.SCP.Utils/packages.config b/CK.SCP.Utils/packages.config deleted file mode 100644 index cb18c55..0000000 --- a/CK.SCP.Utils/packages.config +++ /dev/null @@ -1,5 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<packages> - <package id="log4net" version="2.0.8" targetFramework="net45" /> - <package id="Newtonsoft.Json" version="11.0.1" targetFramework="net45" /> -</packages> \ No newline at end of file diff --git a/SCP/MonthPlan/329ba8a7806349d49421e23399836266.xls b/SCP/MonthPlan/329ba8a7806349d49421e23399836266.xls deleted file mode 100644 index 2982183..0000000 Binary files a/SCP/MonthPlan/329ba8a7806349d49421e23399836266.xls and /dev/null differ diff --git a/SCP/SCP.csproj b/SCP/SCP.csproj index ba14cb9..6766586 100644 --- a/SCP/SCP.csproj +++ b/SCP/SCP.csproj @@ -6098,9 +6098,7 @@ <ItemGroup> <Folder Include="Business\Models\" /> <Folder Include="ClaimFiles\" /> - <Folder Include="DayPlan\" /> <Folder Include="exportfiles\" /> - <Folder Include="MonthPlan\" /> <Folder Include="uploadfiles\" /> </ItemGroup> <ItemGroup>