private void GetFileContentByFileName(dynamic data) { string fileContent = string.Empty; //var exParams = new List<CRMTreeDatabase.EX_Param>(); //var s_q = JsonConvert.SerializeObject(data.queryParams); //if (!string.IsNullOrWhiteSpace(s_q)) //{ // exParams = JsonConvert.DeserializeObject<List<CRMTreeDatabase.EX_Param>>(s_q); //} var FileName = (string)data.FileName; var CG_Code = (int)data.CG_Code; var AU_Code = (int)data.AU_Code; fileContent = BL_Reports.GetFileContent(FileName, new { AU = AU_Code, CG = CG_Code, AD = null != UserSession.Dealer ? UserSession.Dealer.AD_Code : 0, DG = null != UserSession.Dealer ? UserSession.Dealer.AD_DG_Code : 0, OM = null != UserSession.OEM ? UserSession.OEM.OM_Code : 0, CT = 0, CI = 0, DE = null != UserSession.User ? UserSession.User.AU_Code : 0, AS = 0, PA = 0 }); Response.Write(fileContent); }
private void GetFileContent(dynamic data) { string fileContent = string.Empty; var exParams = new List <CRMTreeDatabase.EX_Param>(); var s_q = JsonConvert.SerializeObject(data.queryParams); if (!string.IsNullOrWhiteSpace(s_q)) { exParams = JsonConvert.DeserializeObject <List <CRMTreeDatabase.EX_Param> >(s_q); } var CG_Code = (int)data.CG_Code; fileContent = BL_Reports.GetFileContent(CG_Code, exParams); Response.Write(fileContent); }
private void Get_CustomerInfo(dynamic data) { dynamic o = new ExpandoObject(); var hd_code = (int)data.HD_Code; var db = DBCRMTree.GetInstance(); o.service = db.SingleOrDefault <dynamic>(@"SELECT hd.* ,ch.* ,ch.CH_CI_Code as CI_Code ,AU_Name ,PL_Number ,PL_Code ,CM_FileName ,CG_Type ,CG_Cat FROM CT_Handler hd LEFT JOIN CT_Comm_History ch ON hd.HD_CH_Code = ch.CH_Code LEFT JOIN CT_All_Users au ON ch.CH_AU_Code = au.AU_Code LEFT JOIN CT_Phone_List pl ON ch.CH_ML_PL_Code = pl.PL_Code LEFT JOIN CT_Campaigns on ch.CH_CG_Code=CG_Code LEFT JOIN CT_Camp_Methods on ch.CH_CG_Code=CM_CG_Code and ch_CG_M_Indx=CM_Contact_Index WHERE HD_Code = @0 ", hd_code); if (null != o.service) { o.fileContent = BL_Reports.GetFileContent(o.service.CH_CG_Code, o.service.CH_CG_M_Indx, new { AU = o.service.CH_AU_Code, CG = o.service.CH_CG_Code, AD = null != UserSession.Dealer ? UserSession.Dealer.AD_Code : 0, DG = null != UserSession.Dealer ? UserSession.Dealer.AD_DG_Code : 0, OM = null != UserSession.OEM ? UserSession.OEM.OM_Code : 0, CT = 0, CI = 0, DE = o.service.HD_AU_Code, AS = 0, PA = 0 }); } Response.Write(JsonConvert.SerializeObject(o)); }
private void Get_view_file(dynamic data) { int _au_code = (int)data.AU_Code; int _ap_code = (int)data.AP_Code; BL_Campaign _bl_cam = new BL_Campaign(); CRMTree.Model.CT_Campaigns _o = _bl_cam.GetTXCam(UserSession.DealerEmpl.DE_UType, UserSession.DealerEmpl.DE_AD_OM_Code); string _fileCount = string.Empty; if (data.AU_Code != null && ((string)data.AU_Code) != "" && !string.IsNullOrEmpty(_o.CM_Filename)) { List <CRMTreeDatabase.EX_Param> exParams = new List <CRMTreeDatabase.EX_Param>(); exParams.Add(new CRMTreeDatabase.EX_Param() { EX_DataType = "int", EX_Name = "AU", EX_Value = (string)data.AU_Code }); exParams.Add(new CRMTreeDatabase.EX_Param() { EX_DataType = "int", EX_Name = "AD", EX_Value = UserSession.DealerEmpl.DE_AD_OM_Code.ToString() }); exParams.Add(new CRMTreeDatabase.EX_Param() { EX_DataType = "int", EX_Name = "AP", EX_Value = (string)data.AP_Code }); _fileCount = BL_Reports.GetFileContent(_o.CM_Filename, exParams, 2); } _fileCount = Microsoft.JScript.GlobalObject.escape(_fileCount); CRMTree.Model.CT_All_Users _oo = _bl_cam.GetTXCam_Number(_au_code, _ap_code); string _pl_number = ""; if (_oo != null && !string.IsNullOrEmpty(_oo.PL_Number)) { _pl_number = _oo.PL_Number; } Response.Write(JsonConvert.SerializeObject(new { _con = _fileCount, _pl = _pl_number })); }
private void SendWechatInfo_01(dynamic data) { string OpenId = _http.Session["OpenId"].ToString(); string send_info = "尊敬的车主,您好!\n" + (string.IsNullOrEmpty((string)data.AP_Code) ? "你的预约信息成功处理\n如下是你的预约信息:\n" : "你的预约信息成功修改\n如下是你更改后的预约信息:\n") + "我的汽车:" + data.CAR_CN + "\n" + "经 销 商:" + data.AD_Name_CN + "\n" + "选择顾问:" + data.AU_Name + "\n" + "预约类型:" + data.SER_CN + "\n" + "交通方式:" + data.AP_Tran_Name + "\n" + "预约时间:" + Convert.ToDateTime(data.AP_Time) + "\n"; wechatHandle.SendCustom_text(OpenId, send_info); CT_Campaigns _com; try { _com = _b_camp.GetCampaign(Convert.ToInt32(data.AD_Code), true); } catch { _com = _b_camp.GetCampaign(3, true); } if (_com != null) { List <CRMTreeDatabase.EX_Param> exParams = new List <CRMTreeDatabase.EX_Param>(); exParams.Add(new CRMTreeDatabase.EX_Param() { EX_DataType = "int", EX_Name = "AU", EX_Value = data.AU_Code }); exParams.Add(new CRMTreeDatabase.EX_Param() { EX_DataType = "int", EX_Name = "CI", EX_Value = data.CI_Code }); exParams.Add(new CRMTreeDatabase.EX_Param() { EX_DataType = "int", EX_Name = "AP", EX_Value = data.AP_Code }); exParams.Add(new CRMTreeDatabase.EX_Param() { EX_DataType = "int", EX_Name = "AD", EX_Value = data.AD_Code }); exParams.Add(new CRMTreeDatabase.EX_Param() { EX_DataType = "int", EX_Name = "DE", EX_Value = data.SA_Selected }); exParams.Add(new CRMTreeDatabase.EX_Param() { EX_DataType = "int", EX_Name = "ST", EX_Value = data.ST_Code }); exParams.Add(new CRMTreeDatabase.EX_Param() { EX_DataType = "int", EX_Name = "SC", EX_Value = data.SC_Code }); exParams.Add(new CRMTreeDatabase.EX_Param() { EX_DataType = "int", EX_Name = "MP", EX_Value = data.MP_Code }); wechatHandle.SendCustom_text(OpenId, BL_Reports.GetFileContent(_com.CG_Filename, exParams, 2)); _b_camp.Modify_Comm_History(1, OpenId, _com.CG_Code); } }