摘要: 网易,新浪,谷歌,腾讯的邮件服务都支持stmp协议。using System.Net.Mail; MailMessage message = null; SmtpClient client = null; public void Send() { try { string argFrom = "test@gmail.com"; string argTo = "test@hotmail.com"; string a... 阅读全文
posted @ 2013-03-21 14:31 V.Wang 阅读(339) 评论(0) 推荐(0)
摘要: string strConn = "Data Source=192.18.11.200;Initial Catalog=dbXianNew;user=sa;pwd=test;"; SqlConnection conn = new SqlConnection(strConn); //源连接 conn.Open(); //查询元数据 string strSql = "select * from XiAnData where (LU_MING is not null or LU_MING<... 阅读全文
posted @ 2013-03-15 14:36 V.Wang 阅读(401) 评论(0) 推荐(0)
摘要: ALTER SCHEMA 新架构名 TRANSFER [旧架构].[表明]ALTER SCHEMA dbo TRANSFER [ADMIN].[TABLE1] 阅读全文
posted @ 2013-02-28 16:23 V.Wang 阅读(800) 评论(0) 推荐(1)
摘要: 例如a表的日期是datetime类型的,需要和b表的一个date格式和time格式的组合字段关联a.beginTime=CONCAT(CONCAT(b.workDate,' '),b.beginTime)在mysql中可以直接:a.beginTime=CONCAT(b.workDate,' ',b.beginTime) 阅读全文
posted @ 2013-02-01 13:25 V.Wang 阅读(243) 评论(0) 推荐(0)
摘要: $params["testform"]=$employeeForm->createView();$params["testform"]->getChild('role')->getChild(1)->set('read_only',true);其他可参考Symfony\Component\Form\FormView 阅读全文
posted @ 2013-01-31 17:15 V.Wang 阅读(269) 评论(0) 推荐(0)
摘要: 文章转自:http://blog.csdn.net/jiaochangyun/article/details/7245009#效果如图调用很方便[html] view plaincopyprint?{% import "JcyHelperBundle:tmp:jcyForm.html.twig" as forms %} {{ forms.jcyForm(dbForm,path('JcyHelperBundle_db_set'),'Connect') }} {% import "JcyHelperBundle:tmp:jcyForm. 阅读全文
posted @ 2013-01-29 10:46 V.Wang 阅读(390) 评论(0) 推荐(0)
摘要: 文章来源:http://twig.sensiolabs.org/doc/tests/index.html做逻辑判断的。目前支持的有divisibleby null even odd sameas constant defined emptydivisibleby检查是否能被整除[html] view plaincopyprint?{% if loop.index is divisibleby(3) %} ... {% endif %} {% if loop.index is divisibleby(3) %} ...{% endif %}null[html] view plaincop... 阅读全文
posted @ 2013-01-29 10:44 V.Wang 阅读(317) 评论(0) 推荐(0)
摘要: 写了好几篇关于twig的东西。。居然还没写个快速入门之类的。现在就写来源 http://twig.sensiolabs.org/doc/templates.html概要twig 的模板就是普通的文本文件,也不需要特别的扩展名,.html .htm .twig 都可以。模板内的 变量 和 表达式 会在运行的时候被解析替换,标签(tags)会来控制模板的逻辑下面是个最小型的模板,用来说明一些基础的东西[html] view plaincopyprint?<!DOCTYPE html> <html> <head> <title>My Webpage&l 阅读全文
posted @ 2013-01-29 10:44 V.Wang 阅读(3985) 评论(0) 推荐(0)
摘要: 目前twig内建的函数包括attribute, block, constant, cycle, dump, parent, random, range.其实部分函数,在tags的学习里已经见过了。attribute函数1.2版本新增他就相当于是个. 操作符。[html] view plaincopyprint?{{ attribute(object, method) }} {{ attribute(object, method, arguments) }} {{ attribute(array, item) }} {{ attribute(object, method) }}{{ attrib 阅读全文
posted @ 2013-01-29 10:42 V.Wang 阅读(656) 评论(0) 推荐(0)
摘要: 文章来源 http://twig.sensiolabs.org/doc/tags/index.htmluse标签use标签是1.1版本新添加内容。这个use标签主要是来解决模板只能从一个父模板继承,而你又想重用其他模板的问题。但是use标签只会导入block区块,(注意import只会导入宏macros,include会导入一切。这三个标签要区分清楚)比如[html] view plaincopyprint?{% extends "base.html" %} {% use "blocks.html" %} {% block title %}{% endb 阅读全文
posted @ 2013-01-29 10:41 V.Wang 阅读(272) 评论(0) 推荐(0)