增加引用USERPCO
1、加载采购入库单
//登录U8
U8Login.clsLogin m_ologin = new U8Login.clsLoginClass();
if (!m_ologin.Login("ST", "990", "2023", "demo", "DEMO", "2023-01-31", "127.0.0.1", ""))
{strResult = "login failed ";}
//初始化voucherco
string errMsg = "";
USERPCO.VoucherCO voucherCO = new USERPCO.VoucherCO();
conn.Open(m_ologin.UfDbName);
MSXML2.IXMLDOMDocument2 domHead = new MSXML2.DOMDocument();
MSXML2.IXMLDOMDocument2 domBody = new MSXML2.DOMDocument();
MSXML2.IXMLDOMDocument2 domPosition = new MSXML2.DOMDocument();
voucherCO.IniLogin(m_ologin,ref errMsg);
bool bPositive = true;
string sBillType = "";
//加载采购入库单
voucherCO.Load("1", "id=1000000045", ref domHead, ref domBody, ref domPosition, ref errMsg);
2、新增采购入库单
//新增采购入库单
string vouchid="";
object oMissing = null;
bool bCheck = false;
bool bresult = voucherCO.Insert("1", domHead, domBody, null, ref errMsg,ref conn, ref vouchid, ref domMsg,ref bCheck, ref bCheck, bCheck, "", bCheck);
if (bresult)
{strResult = "set success!";}
else{strResult = errMsg;}
3、删除采购入库单
//删除采购入库单
string vouchid = "1000000054";
if (voucherCO.Delete("01", vouchid, ref errMsg))
{strResult = "delete success!";}
else{strResult = errMsg;}