当前位置: 首页>>代码示例>>C#>>正文


C# CMSDataContext.PopulateSpecialTag方法代码示例

本文整理汇总了C#中CmsData.CMSDataContext.PopulateSpecialTag方法的典型用法代码示例。如果您正苦于以下问题:C# CMSDataContext.PopulateSpecialTag方法的具体用法?C# CMSDataContext.PopulateSpecialTag怎么用?C# CMSDataContext.PopulateSpecialTag使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CmsData.CMSDataContext的用法示例。


在下文中一共展示了CMSDataContext.PopulateSpecialTag方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RunScriptSql

 private string RunScriptSql(CMSDataContext Db, string parameter, string body, DynamicParameters p)
 {
     if (!CanRunScript(body))
         return "Not Authorized to run this script";
     if (body.Contains("@qtagid"))
     {
         var id = Db.FetchLastQuery().Id;
         var tag = Db.PopulateSpecialTag(id, DbUtil.TagTypeId_Query);
         p.Add("@qtagid", tag.Id);
     }
     p.Add("@p1", parameter ?? "");
     return body;
 }
开发者ID:craigsaboe,项目名称:bvcms,代码行数:13,代码来源:HomeController.cs

示例2: RunScriptSql

        private string RunScriptSql(CMSDataContext db, string parameter, string body, DynamicParameters p)
        {
            if (!CanRunScript(body))
                return "Not Authorized to run this script";
            if (body.Contains("@qtagid", ignoreCase:true))
            {
                var id = db.FetchLastQuery().Id;
                var tag = db.PopulateSpecialTag(id, DbUtil.TagTypeId_Query);
                int? qtagid = tag.Id;
                p.Add("@qtagid", qtagid);
                ViewBag.Type = "SqlReport";
            }
            else if (body.Contains("@CurrentOrgId", ignoreCase:true))
            {
                var oid = DbUtil.Db.CurrentOrgId0;
                p.Add("@CurrentOrgId", oid);
                if(oid > 0)
                {
                    var name = DbUtil.Db.LoadOrganizationById(oid).FullName2;
                    ViewBag.Name2 = name;
                    ViewBag.Type = "SqlReport";
                }
            }
            else if (body.Contains("@OrgIds", ignoreCase: true))
            {
                var oid = DbUtil.Db.CurrentOrgId0;
                p.Add("@OrgIds", oid.ToString());
                ViewBag.Type = "OrgSearchSqlReport";

                if (body.Contains("--class=StartEndReport"))
                {
                    p.Add("@MeetingDate1", DateTime.Now.AddDays(-90));
                    p.Add("@MeetingDate2", DateTime.Now);
                }
            }
            else
                ViewBag.Type = "SqlReport";
            if (body.Contains("@userid", ignoreCase:true))
                p.Add("@userid", Util.UserId);
            p.Add("@p1", parameter ?? "");
            return body;
        }
开发者ID:clearfunction,项目名称:bvcms,代码行数:42,代码来源:HomeController.cs

示例3: Email2

        private void Email2(CMSDataContext db2, IQueryable<Person> q, int queuedBy, string fromAddr, string fromName, string subject,
            string body)
        {
            var from = new MailAddress(fromAddr, fromName);
            q = from p in q
                where p.EmailAddress != null
                where p.EmailAddress != ""
                where (p.SendEmailAddress1 ?? true) || (p.SendEmailAddress2 ?? false)
                select p;
            var tag = db2.PopulateSpecialTag(q, DbUtil.TagTypeId_Emailer);

            Util.IsInRoleEmailTest = TestEmail;
            var queueremail = db2.People.Where(pp => pp.PeopleId == queuedBy).Select(pp => pp.EmailAddress).SingleOrDefault();
            if(!queueremail.HasValue())
                throw new Exception("QueuedBy PeopleId not found in model.Email");
            Util.UserEmail = queueremail;
            db2.SetCurrentOrgId(CurrentOrgId);

            var emailqueue = db2.CreateQueue(queuedBy, from, subject, body, null, tag.Id, false);
            emailqueue.Transactional = Transactional;
            db2.SendPeopleEmail(emailqueue.Id);
        }
开发者ID:GSBCfamily,项目名称:bvcms,代码行数:22,代码来源:Email.cs


注:本文中的CmsData.CMSDataContext.PopulateSpecialTag方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。