1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
  | 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(); 
 |          /// <summary> 
 |          /// 新增送货单 
 |          /// </summary> 
 |          /// <param name="GroupName">班级名称</param> 
 |          /// <param name="isModify">是否修改状态</param> 
 |          /// <returns></returns> 
 |          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); 
 |              //} 
 |               
 |          } 
 |      } 
 |  } 
 |  
  |