| 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); | 
|             } | 
|         } | 
|     } | 
| } |