文章分类 -  c#代码

摘要:public void saveJson(string sbJson) { string strPath = HttpContext.Current.Server.MapPath("~/Map"); if (!Directory.Exists(strPath)) { Directory.Create 阅读全文
posted @ 2017-10-25 09:40 牡丹
摘要:PostBackUrl=''>多个参数:' runat="server">LinkButton 阅读全文
posted @ 2014-09-12 14:19 牡丹 阅读(456) 评论(0) 推荐(0)
摘要:加载页面调用方法url = Request.RawUrl;//得到地址栏路径 retResult = InitChineseUrl(url.Trim().ToString());加码的方法public static string InitChineseUrl(string ch... 阅读全文
posted @ 2014-05-07 13:22 牡丹 阅读(1406) 评论(0) 推荐(0)
摘要:http://www.cnblogs.com/gossip/archive/2011/03/17/1986821.htmlforeach (RepeaterItem item in dd.Controls) { //if (item.ItemType == ListItemType.Header) ... 阅读全文
posted @ 2014-01-22 11:20 牡丹 阅读(175) 评论(0) 推荐(0)
摘要:CREATEPROCEDUREDInstitute_Insert@InstituteNOnvarchar(6),@InstituteNamenvarchar(40)ASdeclare@returnint,@countintif(ltrim(rtrim(@InstituteName))=''orltr... 阅读全文
posted @ 2014-01-20 09:35 牡丹 阅读(292) 评论(0) 推荐(0)
摘要:页面代码 序号 名称 数值 1 供电煤耗 g/(kw.h)--%> g/(kw.h) Response.ContentType = "application/ms-word"; Response.AddHeader("Content-Disposition", "i... 阅读全文
posted @ 2014-01-15 11:31 牡丹 阅读(175) 评论(0) 推荐(0)
摘要:调用存储过程set ANSI_NULLS ON set QUOTED_IDENTIFIER ON goALTER PROCEDURE [dbo].[GetSequenceNumber] ( @Code nvarchar(10), @Count int = 1 ) AS BEGIN DECLARE @... 阅读全文
posted @ 2014-01-14 15:38 牡丹 阅读(175) 评论(0) 推荐(0)
摘要:ReportToExcel(控件id);public void ReportToExcel(Repeater dd) { string sname = Convert.ToString("导出到excel.xls"); HttpContext.Current.Response.Charset = "... 阅读全文
posted @ 2014-01-14 14:02 牡丹 阅读(138) 评论(0) 推荐(0)
摘要:在默认页面写脚本(登陆页面) 阅读全文
posted @ 2014-01-13 16:33 牡丹 阅读(75) 评论(0) 推荐(0)
摘要:添加引用 Aspose.Words;using Aspose.Words;using Aspose.Words.Saving;/// /// 导出word文档 /// /// /// protected void btn_word_Click(object sender, Even... 阅读全文
posted @ 2014-01-04 16:25 牡丹 阅读(567) 评论(0) 推荐(0)
摘要:public void DrawTable() { int row = 0; int numrows = Convert.ToInt32(10); // 获得文本框中整型数 行 int numcells = Convert.ToInt32(10); // 列 for (int j =... 阅读全文
posted @ 2014-01-04 15:51 牡丹 阅读(206) 评论(0) 推荐(0)
摘要:public void drawHtml() { //创建一个表格对象 HtmlTable ht = new HtmlTable(); //设置表格属性 ht.BorderColor = "Green"; ht.CellPadding = 10; ht.Width = "100%";... 阅读全文
posted @ 2014-01-04 15:50 牡丹 阅读(752) 评论(0) 推荐(0)
摘要:if (!Directory.Exists(Server.MapPath("~" + wordPath))) { Directory.CreateDirectory(Server.MapPath("~" + wordPath)); } 阅读全文
posted @ 2013-12-28 17:17 牡丹 阅读(102) 评论(0) 推荐(0)
摘要:using System;using System.Web;using System.IO;using System.Text;using System.Reflection;using System.Collections.Generic;using System.Diagnostics;/// ... 阅读全文
posted @ 2013-12-28 17:16 牡丹 阅读(221) 评论(0) 推荐(0)
摘要:Double salary1 = 10000.0;Double salary2 = 10000.12345;Double salary3 = 10000.1289;Int salary4 = 10000;string salary5 = "10000";string salary6 = "10000... 阅读全文
posted @ 2013-12-28 17:15 牡丹 阅读(2608) 评论(0) 推荐(0)