using Microsoft.VisualStudio.TestTools.UnitTesting; using System; using System.Collections.Generic; using System.Diagnostics; using System.Web.UI.WebControls; using UFIDA.U8.Framework.Api.ControlObject.AP; using UFIDA.U8.Framework.Api.ControlObject.Models; using UFIDA.U8.Framework.Api.ControlObject.U8M; namespace UFIDA.U8.Framework.Api.Tests.Controllers { [TestClass] public class UnitTest1 { [TestMethod] public void TestMethod1() { var baseLogin = new BaseLogin(); baseLogin.Init( new LoginParamter() { cSerial = "", cSrv = "192.168.50.31", pAccId = "(default)@801", pDate = "2015-07-01", pPassword = "", pSubId = "DP", pUserId = "demo", pYearId = "2015" }, false); var bo = new UFAPBO(); var dd = new List>(); var da = new Dictionary(){ { "bPrePay", 0 }, { "iType", 0 }, { "cType", "应付款" }, { "iAmt_f", 100 }, { "iAmt", 100 }, { "cKm", "220202" }, { "cDepName", "采购部" }, { "cPersonName", "顾潇" }, { "iRAmt_f", 100.00 }, { "iRAmt", 100.00 }, { "cCusVen", "01004" }, { "iAmt_s", 0 }, { "iRAmt_s", 0 }, { "cDepCode", "0401" }, { "cPersonCode", "00043" } }; ; dd.Add(da); var dict = new Dictionary() { { "cVouchType", "49" }, { "cVouchID", "0000000030" }, { "dVouchDate", "2015-07-22" }, { "cDwCode", "01004" }, { "cSSCode", "1" }, {"cDeptCode", "0401"}, {"cSSName", "现金"}, {"iPeriod", 7}, {"cPerson", "00043"}, {"cPersonName", "顾潇"}, {"cexch_name", "人民币"}, {"iExchRate", 1}, {"iAmount_f", 100.00}, {"iAmount", 100.00}, {"iRAmount_f", 100.00}, {"iRAmount", 100.00}, {"cTypeName", "付款单"}, {"cFlag", "AP"}, {"iPayForOther", 0}, {"bFromBank", 0}, {"bToBank", 0}, {"bSure", 0}, {"cCode", "1001"}, { "bStartFlag", 0}, {"body",dd} }; var res= bo.CloseBillSave(baseLogin, dict, "AP"); Trace.WriteLine("aaaaa"); } } }