using System; using WX.CRM.BLL.Wx; using WX.CRM.Common; using WX.CRM.DataSynFactory.Templates; using WX.CRM.Model.Entity; namespace WX.CRM.DataSynFactory.Cmd { public class Client_SyncHandGift_IMP : Interfaces.IDataImportSvr { public bool GenerateBusinessOne(Client_SyncHandGift t) { try { WX_SZZYORDER_HANDGIFT_BL bl = new WX_SZZYORDER_HANDGIFT_BL(); ValidationErrors errors = new ValidationErrors(); decimal producttype = 0; if (t.producttype != null) { Decimal.TryParse(t.producttype.ToString(), out producttype); } WX_SZZYORDER_HANDGIFT model = new WX_SZZYORDER_HANDGIFT() { ORDERID = t.orderid, MAINORDERID = t.mainorderid, SOFTUSERNAME = t.softusername, PRODUCTID = t.productid, RESID = t.resid, PRODUCTCODE = t.productcode, ORDERSTATUS = t.orderstatus, SUBPRODUCTCODE = t.subproductcode, SUBPRODUCTNAME = t.subproductname, MEMO = t.memo, CREATEUSER = t.createuser, CTIME = t.ctime, CHANNEL = t.channel, COMPANYCODE = t.companycode, GIFTDAYS = t.giftdays, OPENUSER = t.openuser, OPTIME = t.optime, SZZYORDERID = t.szzyorderid, CHECKMEMO = t.checkmemo, OTIME = t.optime, PRODUCTTYPE = producttype, CLOSETIME = t.closetime, CLOSEUSER = t.closeuser, CLOSEMEMO = t.closememo, CONTRACTCTIME = t.contractctime, CONTRACTSTATUS = t.contractstatus, CONTRACTCODE = t.CONTRACTCODE, }; model.CREATEEID = t.CREATEEID; var result = bl.AddHandGift(model, ref errors); return result; } catch (Exception ex) { LogHelper.Error(ex.ToString()); return false; } } } }