using Model; using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace WebAPI.DAL { public class DataBaseServices : DBUtility.ClsXt_BaseBill { public SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); /// /// 新增送货单 /// /// 班级名称 /// 是否修改状态 /// public int SavePOInStockBill(string POInStock) { return 0; //string sql = ""; //string sReturn = ""; //JObject job = JObject.Parse(POInStock); //try //{ // //得到mainid // Int64 HInterID = DBUtility.ClsPub.CreateBillID("1103", ref DBUtility.ClsPub.sExeReturnInfo); // //若MAINDI重复则重新获取 // oCn.BeginTran(); // //主表 // oCn.RunProc("Insert Into Cg_POInStockBillMain " + // "(HBillType,HBillSubType,HInterID,HBillNo,HDate" + // ",HYear,HPeriod,HRemark,HMaker,HMakeDate" + // ",HAddress,HSupID,HCurID,HWHID,HExRate" + // ",HEmpID,HManagerID,HDeptID,HExplanation,HInnerBillNo" + // ") " + // " values('1103','11251'," + HInterID.ToString() + ",'" + job["单据号"].ToString() + "','" + job["日期"].ToString() + "'" + // ",'2019',12,'" + job["表头备注"].ToString() + "','admin',getdate()" + // ",'null'," + job["hsubid"].ToString() + "," + job["hcurid"].ToString() + ",'null','null'"+ // ", " + job["HEmpID"].ToString() + "," + job["hmanagerid"].ToString() + "," + job["HDeptID"].ToString() + ",'null','null'" + // ") "); // //插入子表 // foreach (Model.ClsCg_POInStockBill oSub in ) // { // oCn.RunProc("Insert into Cg_POInStockBillSub " + // " (HInterID,HEntryID,HRemark,HDate" + // ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney" + // ",HMaterID,HUnitID,HQty,HPrice,HMoney,HWHID" + // ",HPOOrderInterID,HPOOrderEntryID,HPOOrderBillNo,HCheckQty,HPassQty,HBadQty" + // ") values(" // + omodel.HInterID.ToString() + "," + oSub.HEntryID.ToString() + ",'" + oSub.HRemark + "','" +oSub.HDate + // "'," + oSub.HSourceInterID.ToString() + "," + oSub.HSourceEntryID.ToString() + ",'" + oSub.HSourceBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() + // "," + oSub.HMaterID.ToString() + "," + oSub.HUnitID.ToString() + "," + oSub.HQty.ToString() + "," + oSub.HPrice.ToString() + "," + oSub.HMoney.ToString() + "," + oSub.HWHID.ToString() + // "," + oSub.HPOOrderInterID.ToString() + "," + oSub.HPOOrderEntryID.ToString() + ",'" + oSub.HPOOrderBillNo + "'," + oSub.HCheckQty.ToString() +","+oSub.HPassQty.ToString() +"," +oSub.HBadQty.ToString() + // ") "); // } // oCn.Commit(); // return 1; //} //catch (Exception e) //{ // sReturn = e.Message; // oCn.RollBack(); // throw (e); //} } } }