zgq
2021-08-07 1433a63dd853e09467710eff357ead332fb1deab
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
71
72
73
74
75
76
77
78
79
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
 
namespace DAL
{
    public class ClsCrm_CustomerFile_View:DBUtility.ClsGy_Base_View
    {
        
        //
        public Model.ClsCrm_CustomerFileMain omodel = new Model.ClsCrm_CustomerFileMain();
        SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); 
        public ClsCrm_CustomerFile_View()
        {
            base.MvarReportTitle = "客户档案设置";
            base.MvarItemKey = "h_v_Crm_CustomerFileList";
            base.SQLName = "Select HMainID,HCusID,客户名称,客户简称,客户分类 from h_v_Crm_CustomerFileList Order by HMainID ";
        }
        //
        public void Dispose()
        {
            GC.SuppressFinalize(this);
        }
        //
 
        //返回项目信息
        public override bool GetInfoByID(Int64 sItemID)
        {
            DataSet DS ;
            try
            {
                DS = oCn.RunProcReturn("Select * from " + MvarItemKey + " Where HMainID='" + sItemID + "'", MvarItemKey, ref DBUtility.ClsPub.sExeReturnInfo);
                if (DS.Tables[0].Rows.Count  == 0)
                    return false;
                else
                {
                    return GetInfo(DS);
                }
            }
            catch (Exception e)
            {
                throw (e);
            }
        }
 
        //返回项目信息
        public override bool GetInfo(DataSet Ds)
        {
            try
            {
                omodel = new Model.ClsCrm_CustomerFileMain();
                omodel.HInterID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HMainID"]);
                omodel.HName = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["姓名"]);
                //omodel.HCallName = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["称呼"]);
                //omodel.HPost = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["英文名"]);
                //omodel.HCusID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCusID"]);
                //omodel.HLinkPhone = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["办公电话"]);
                //omodel.HMovePhone = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["手机"]);
                //omodel.HQQ = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["QQ"]);
                //omodel.HEmail = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["邮箱"]);
                //omodel.HFax = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["传真"]);
                //omodel.HCusFrom = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["客户来源"]);
                //omodel.HFstLinkMan = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["首要客户档案"]);
                //omodel.HHomePhone = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["家庭电话"]);
                //omodel.HManager = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["负责人"]);
                //omodel.HDept = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["部门"]);
                //omodel.HLead = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["上级"]);
                //
                return true;
 
            }
            catch (Exception e)
            {
                throw (e);
            }
        }
    }
}