2011年4月14日
摘要: 实体类Student:程序代码/// <summary>/// 学生实体类/// </summary>[System.Runtime.Serialization.DataContract(Namespace="http://www.mzwu.com/")]public class Student{ private string _Name; private int _Age; public Student(string name, int age) { _Name = name; _Age = age; } /// <summary> / 阅读全文
posted @ 2011-04-14 10:43 dezi 阅读(8265) 评论(0) 推荐(0) 编辑
摘要: flash调用HTML中函数:1.flash(as3)中调用代码:var strall:String=ExternalInterface.call("GetCityAlertWeather");GetCityAlertWeather为html中要的函数,strall为调用GetCityAlertWeather函数后得到的值2.html中function GetCityAlertWeather(){return aa;}Html调用flash中函数:1.flash中ExternalInterface.addCallback(‘flashfunc‘,func); private 阅读全文
posted @ 2011-04-14 00:26 dezi 阅读(1781) 评论(0) 推荐(0) 编辑
  2011年4月13日
摘要: using using Microsoft.Office.Interop.Word; (通过添加引用-com组件,找office的word组件/// <summary> /// 打印word /// </summary> /// <param name="filepath">word文件路径</param> /// <param name="printername">指定的打印机</param> public void Printword(string filepath,string 阅读全文
posted @ 2011-04-13 23:23 dezi 阅读(20199) 评论(4) 推荐(1) 编辑
摘要: private void Run() { LocalReport report = new LocalReport(); report.ReportPath = @"F:\SelfSystemPractice\Report\sqlserverreport\sqlserverreport\Report1.rdl"; string connstr = @"Data Source=WIN-MT5JMJEOHPK;Initial Catalog=Study;Integrated Security=True"; SqlConnection conn = new S 阅读全文
posted @ 2011-04-13 23:17 dezi 阅读(3958) 评论(1) 推荐(0) 编辑
摘要: sp_executesql 的参数必须为UNICODE,即NCHAR,NVARCHAR,NTEXT型,否则报错动态sql语句基本语法 1 :普通SQL语句可以用Exec执行 Select * from tableName Exec('select * from tableName') Exec sp_executesql N'select * from tableName' -- 请注意字符串前一定要加N 2:字段名,表名,数据库名之类作为变量时,必须用动态SQL eg: declare @fname varchar(20) set @fname = ' 阅读全文
posted @ 2011-04-13 18:20 dezi 阅读(1815) 评论(0) 推荐(0) 编辑
摘要: CREATE procedure [dbo].[Prc_splitpage] @sql nvarchar(4000), @idField nvarchar(100), @page int=1, @pageSize int, @pageCount int=0 out, @recordCount int=0 out, @where nvarchar(4000), @order nvarchar(4000) asdeclare @sqlLen int declare @sqlWhereIndex int declare @sqlWhere nvarchar(4000)declare @sqlOrde 阅读全文
posted @ 2011-04-13 17:56 dezi 阅读(178) 评论(0) 推荐(0) 编辑
摘要: xml文件:<?xml version="1.0" encoding="utf-8"?><AutoPrintProject> <Project> <ProjectName>SPA Reminder</ProjectName> <Status>Disable</Status> <LastPrintTime>2011-4-3 11:00:00</LastPrintTime> <Daily>1</Daily> <StartT 阅读全文
posted @ 2011-04-13 17:50 dezi 阅读(263) 评论(0) 推荐(0) 编辑
摘要: 一、字符转换函数1、ASCII()返回字符表达式最左端字符的ASCII 码值。在ASCII()函数中,纯数字的字符串可不用‘’括起来,但含其它字符的字符串必须用‘’括起来使用,否则会出错。2、CHAR()将ASCII 码转换为字符。如果没有输入0 ~ 255 之间的ASCII 码值,CHAR() 返回NULL 。3、LOWER()和UPPER()LOWER()将字符串全部转为小写;UPPER()将字符串全部转为大写。4、STR()使用 STRSTR 函数将数字转换为字符,用可选的参数来指定结果的总长度(包括小数点和小数点后的位数)。STR 的长度和小数参数(如果提供)应该是正数。默认长度是 1 阅读全文
posted @ 2011-04-13 17:41 dezi 阅读(299) 评论(0) 推荐(0) 编辑
  2011年4月2日
摘要: 第一种,OnClientClick (vs2003不支持这个方法)<asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="client_click()" OnClick="Button1_Click" />client_click() 就是javascript的一个方法。第二种,Button1.Attributes.Add("onclick", "return Client 阅读全文
posted @ 2011-04-02 11:11 dezi 阅读(265) 评论(0) 推荐(0) 编辑