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
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
 
namespace DAL
{
    public class ClsK3_MatePriceCus_Ctl:DBUtility.ClsGy_Base_Ctl 
    {
        SQLHelper.ClsCNK3 oK3Cn = new SQLHelper.ClsCNK3();
 
        public Model.ClsK3_MatePriceCus_Model oModel ;
 
        //K3单据新增
        public bool AddNew_K3()
        {
            try
            {
                oK3Cn.BeginTran();
                oK3Cn.RunProc("Insert into " + MvarItemKey + " " +
                    " (FInterID,FItemID,FRelatedID,FModel" +
                    ",FAuxPropID,FUnitID,FBegQty,FEndQty,FCuryID" +
                    ",FPriceType,FPrice,FBegDate,FEndDate,FLeadTime" +
                    ",FNote,FChecked,FIndex,FTime,FID" +
                    ",FBase,FBase1,FBegQty_Base,FEndQty_Base,FInteger" +
                    ",FClassTypeID,FBCust,FB2CustCls,FB2Emp,FB2EmpCls" +
                    ",FB2VipGrp,FB2Cust,FB2ItemID,FB2Item,FFlagSave) " +
                    " Values(" + oModel.HInterID.ToString() + "," + oModel.HMaterID.ToString() + "," + oModel.HCusID.ToString() + ",0 " +
                      ",0," + oModel.HUnitID.ToString() + "," + oModel.HBegQty.ToString() + "," + oModel.HEndQty.ToString() + "," + oModel.HCurID.ToString() +
                      ",0," + oModel.HPrice.ToString() + ",'" + oModel.HBegDate.ToShortDateString() + "','" + oModel.HEndDate.ToShortDateString() + "',0 " +
                      ",'" + oModel.HRemark + "'," + DBUtility.ClsPub.BoolToString(oModel.HChecked) + ",0,null,0 " +
                      ",0,0,0,0,0 " +
                      ",0,0,0,0,0 " +
                      ",0,0,0,0,''" +
                    ")", ref DBUtility.ClsPub.sExeReturnInfo);
                oK3Cn.Commit();
                return true;
            }
            catch (Exception e)
            {
                oK3Cn.RollBack();
                throw (e);
            }
        }
 
 
        //构造函数
        public ClsK3_MatePriceCus_Ctl()
        {
            MvarItemKey = "ICPrcPlyEntry";
            MvarReportTitle = "销售价格表设置";
            oModel = new Model.ClsK3_MatePriceCus_Model();
        } 
    }
}