/// <summary> /// 普通接口发送图文消息 /// </summary> /// <param name="touser"></param> /// <param name="type"></param> /// <returns></returns> public static int SendCustom_News(string touser, int type) { MD_CampaignList _c = BL_Campaign.GetRecommend_Trpe(type); if (_c == null || _c.CampaignList == null) { wechatHandle.SendCustom_text(touser, "暂时没有相关的活动推荐给你"); return(10000); } IList <customSend> _customSend = new List <customSend>(); foreach (CT_Campaigns cam in _c.CampaignList) { _customSend.Add(new customSend() { title = cam.CG_Desc, description = cam.CG_Desc, picurl = "http://www.daeku.com/images/1.jpg", url = System.Configuration.ConfigurationManager.AppSettings["Wechat_Web_Url"] + "plupload/file/" + cam.CG_Filename, }); } string _news = wechatHandle.custom_News(touser, _customSend); return(wechatHandle.SendCustom_news(_news)); }
private void Save_Service(dynamic data) { CRMTree.BLL.BL_Campaign bll = new CRMTree.BLL.BL_Campaign(); var db = DBCRMTree.GetInstance(); try { using (var tran = db.GetTransaction()) { Save_Schedule(data, db); Save_Resources(data, db); Save_Options(data); Save_Departments(data, db); tran.Complete(); } Save_Camp_Call(data); Response.Write(JsonConvert.SerializeObject(new { isOK = true })); } catch (Exception ex) { db.AbortTransaction(); Response.Write(JsonConvert.SerializeObject(new { isOK = false, msg = ex.Message })); } }
private dynamic Get_Approval(int AU_AD_Code) { CRMTree.BLL.BL_Campaign bll = new CRMTree.BLL.BL_Campaign(); DataTable dt = bll.GetApprovalInfo(UserSession.DealerEmpl.DE_UType, AU_AD_Code, Interna, this.UserSession.User.UG_UType); //IEnumerable<CT_Auth_Process> approval = null; //approval = CT_Auth_Process.Query(@"where AT_AD_OM_Code = @0", AU_AD_Code); return(dt); }
public int ReportRun(ReportRunParam rParam) { //-1 代表请求参数为空; if (rParam == null) { return(-1); } CT_Reports _r; if (rParam.pType == 1) { BL_Campaign c = new BL_Campaign(); CT_Campaigns _c = c.GetCampaign(rParam.CG_EV_Code); CT_Param_Value _p = new CT_Param_Value() { RP_Code = _c.CG_RP_Code, PV_Type = 1, PV_CG_Code = _c.CG_Code, PV_UType = rParam.UType, PV_AD_OM_Code = rParam.AU_AD_OM_Code }; _r = GetReplaceReport(_p); List <CRMTreeDatabase.EX_Param> eps = new List <CRMTreeDatabase.EX_Param>(); CRMTreeDatabase.EX_Param ep = new CRMTreeDatabase.EX_Param(); ep.EX_Name = "PR"; ep.EX_Value = "0"; ep.EX_DataType = "int"; eps.Add(ep); //var oeps = JsonConvert.SerializeObject(eps); _r.RP_Query = GetReportSql(_r.RP_Code, eps).SQL; return(_D_re.ReportRun <CT_Campaigns>(_r, _c, rParam.UType, rParam.AU_AD_OM_Code)); } else if (rParam.pType == 2) { DL_Event e = new DL_Event(); CT_Events _e = e.getEvents(rParam.CG_EV_Code); CT_Param_Value _p = new CT_Param_Value() { RP_Code = _e.EV_RP_Code, PV_Type = 2, PV_CG_Code = _e.EV_Code, PV_UType = rParam.UType, PV_AD_OM_Code = rParam.AU_AD_OM_Code }; _r = GetReplaceReport(_p); _r.RP_Query = GetReportSql(_r.RP_Code, null).SQL; return(_D_re.ReportRun <CT_Events>(_r, _e, rParam.UType, rParam.AU_AD_OM_Code)); } return(-1); }
private void Init_Page() { int intCG_Code = RequestClass.GetInt("id", 0); if (intCG_Code <= 0) { Campaign.CG_Start_Dt = DateTime.Now; Campaign.CG_End_Dt = DateTime.Now.AddDays(5); } else { CRMTree.BLL.BL_Campaign Cam = new CRMTree.BLL.BL_Campaign(); Campaign = Cam.GetCampaign(intCG_Code); if (Campaign == null || string.IsNullOrEmpty(Campaign.CG_Title)) { string str = "<script language=javascript>history.go(-1);</script>"; //Page.RegisterClientScriptBlock("key", str); } } }