Exemplo n.º 1
0
 public override string Translate(SqlCompilerContext context, SqlUpdate node, UpdateSection section)
 {
     switch (section)
     {
     case UpdateSection.Limit:
         return("ROWS");
     }
     return(base.Translate(context, node, section));
 }
Exemplo n.º 2
0
        public IHttpActionResult UpdateSection(UpdateSection obj)
        {
            var cc = YL.BookSection.Where(a => a.SectionlD == obj.SectionID).FirstOrDefault();

            cc.SectionOrder   = obj.SectionOrder;
            cc.SectionContent = obj.SectionContent;
            //    cc.AddTime = DateTime.Now;
            cc.Remark = obj.Remark;
            YL.SaveChanges();

            return(Content(HttpStatusCode.OK, new resultInfo {
                Code = 200, Message = "更新成功", Data = cc
            }));
        }
Exemplo n.º 3
0
        public override string Translate(SqlCompilerContext context, SqlUpdate node, UpdateSection section)
        {
            switch (section)
            {
            case UpdateSection.Entry:
                return("UPDATE");

            case UpdateSection.Set:
                return("SET");

            case UpdateSection.From:
                return("FROM");

            case UpdateSection.Where:
                return("WHERE");
            }
            return(string.Empty);
        }