最新评论

共10页: 1 2 3 4 5 6 7 8 9 下一页 末页 
夫人的老公 2011-12-08 14:43
mark一下吧
Jerry Hong 2011-07-10 10:59
In Excel, How to Print to JPG in A4 format? First, print to xps file format. Then open the xps file, and print. After the print setting dialog is showed, notice to "Perferences" button, and Click it. In the new showed dialog, see the second tab (Advance). Notice to TITF, with a value maybe 100,200,300. Using different rate to generate different quanlity picture. After the TITF file is printed, opent it with Windows Paint, and save as JPG. Make sure the size is between 1654 x 2339 and 2480 x 3508.
Jerry Hong 2011-05-28 23:11
魔塔大陆1,2,3
Jerry Hong 2011-05-28 22:40
Minoriの「eden*」
Jerry Hong 2011-05-28 22:39
Circusの「UNI」
Jerry Hong 2011-05-26 23:57
「獣の奏者エリン」 「ガラスの仮面」と同じ 見なければならない、素晴らしい作だ 内容も、音楽も、最初から最後まで全部素晴らしかった。
Jerry Hong 2011-05-26 23:54
「俺も妹はそんなに可愛いあるわけない」 ちょっと別類的な設定ですが、設定もよい
Jerry Hong 2011-05-26 23:52
「天空のエスカフローネ」(圣天空战记) 素晴らしい設定、多い不思議を感じた
Jerry Hong 2010-11-23 16:51
ガラスの仮面 見なければならない物語、感想万分、見るときっと夢中になる 演劇のよい見本も沢山ある、元々それは演劇な物語ですから。
Jerry Hong 2010-11-21 09:09
Fairy tail 妖精の尻尾 熱血的、前向き、笑わせる 素晴らしいアニメを発見
Jerry Hong 2010-06-29 00:45
Clannad & Clannad After Story 特別のは「After Story」篇、素晴らしいものだ。
Jerry Hong 2010-06-29 00:40
Guin Saga,「豹頭の仮面」 史诗般的战争,但也有着让人争议的故事转变,人物设定上还是让人有所不能十分认同。再加上是不能可完结的故事。。。不过。。。是部不错的动画。。。
Jerry Hong 2010-06-05 17:04
bcp "select 'Table catalog','table name' union all select table_catalog,table_name from INFORMATION_SCHEMA.TABLES" queryout "c:\export_data.csv" -T -c -r\n -t,
Jerry Hong 2010-03-21 15:24
Please refer to the following links, wish their can help you more. [url=http://msdn.microsoft.com/en-us/library/ms972976.aspx][b]Understanding ASP.NET View State[/b][/url] [url=http://msdn.microsoft.com/en-us/library/bb546184.aspx][b]Serialization (LINQ to SQL)[/b][/url]
RicoRui 2010-03-20 23:17
我不明白为什么要这样做 直接以Entity存入不可以吗 为啥还要序列化之后再存入呢 用意是什么?
Jerry Hong 2009-08-19 16:17
It's more easy to use Entity Framework instead of LINQ to Entity techniques, for it hasn't the unserializable issues. Of course, the Entity Framework seems more powerful and better.
Jerry Hong 2009-08-07 10:22
When using GridView web control, recently I found it was easy to use the ObjectDataSource as its DataSource. Lots of time in your situations, you feel more free to write your own functions and call them when do the CURT in GridView, but for example, when updating a row, it's a little inconvenient to get out all values in TextBox, at least, I'm. so, if you using the OjbectDataSource, you just need you update function's parameter to be an entity type as one of the same as your ObjectDataSource, and you will get all you want. Your Select function maybe you get List<Customer> return type, so, your Update parameter type will be Customer, in order to catch the update row and the ObjectDataSource will turn it into an Customer instance. About the [b]Delete method[/b], you must add the "[b]DataKeyNames[/b]" property for your GridView, the delete method will just catch the values setted in that property, of course, your can set more than one field for the situation of your primary key is more than one field. So, the values not showed in the property "DataKeyNames" will not be filled automatically. Your [b]Custom field[/b], you maybe have some fields not in the Entity Framework's entity, so, you will add a new class file and use the [b]partial[/b] decoration for it to extend your original entity. if someone have any good idea, just post your opinions for sharing.
Jerry Hong 2009-08-04 16:54
using GemBox.ExcelLite to export to excel file in YxShop's website's open source project.(http://www.yxshop.cn) [code=csharp] private void ExportXls(DataTable datas) { ExcelFile excel = new ExcelFile(); #region ExcelWorksheet sheet = excel.Worksheets.Add("商品信息"); sheet.Cells.GetSubrangeAbsolute(0, 0, 0, 11).Merged = true; sheet.Cells[0, 0].Value = "商品信息"; sheet.Cells[0, 0].Style.Font.Size = 16 * 20; sheet.Cells[0, 0].Style.Font.Weight = 700; sheet.Cells[0, 0].Style.HorizontalAlignment = HorizontalAlignmentStyle.Center; sheet.Rows[0].Height = 30 * 20; sheet.Rows[1].Height = 25 * 20; sheet.Cells[1, 0].Value = "商品名称"; sheet.Cells[1, 1].Value = "商品编码"; sheet.Cells[1, 2].Value = "单位"; sheet.Cells[1, 3].Value = "商城价"; sheet.Cells[1, 4].Value = "市场参考价"; int Index = 0; while (Index <= 4) { sheet.Cells[1, Index].Style.Font.Size = 4 * 20; sheet.Cells[1, Index].Style.Font.Weight = 700; sheet.Cells[1, Index].Style.HorizontalAlignment = HorizontalAlignmentStyle.Center; sheet.Columns[Index].Style.Font.Name = "宋体"; Index++; } sheet.Columns[0].Width = 20 * 256; sheet.Columns[1].Width = 10 * 256; sheet.Columns[2].Width = 15 * 256; sheet.Columns[3].Width = 15 * 256; sheet.Columns[4].Width = 15 * 256; #endregion Index = 2; for (int i = 0; i < datas.Rows.Count; i++) { #region sheet.Cells[Index, 0].Value = datas.Rows[i]["Pro_Name"].ToString(); sheet.Cells[Index, 1].Value = datas.Rows[i]["Pro_NO"].ToString(); sheet.Cells[Index, 2].Value = datas.Rows[i]["ProU_Name"].ToString(); sheet.Cells[Index, 3].Value = datas.Rows[i]["Pro_ShopPrice"]; sheet.Cells[Index, 4].Value = datas.Rows[i]["Pro_MarketPrice"]; Index++; #endregion } string FileName = Server.MapPath("~/data") + "\\" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".xls"; excel.SaveXls(FileName); System.IO.FileInfo file = new System.IO.FileInfo(FileName); Response.Clear(); Response.Buffer = true; Response.Charset = "utf-8"; Response.ContentEncoding = System.Text.Encoding.GetEncoding("utf-8"); Response.AddHeader("Content-Disposition", "attachment; filename=" + HttpUtility.UrlEncode("商品信息.xls", System.Text.Encoding.GetEncoding("utf-8"))); string temp = HttpUtility.UrlEncode("商品信息.xls", System.Text.Encoding.GetEncoding("utf-8")); Response.AddHeader("Content-Length", file.Length.ToString()); Response.ContentType = "application/ms-excel"; this.EnableViewState = false; Response.Flush(); Response.WriteFile(file.FullName); Response.Flush(); File.Delete(FileName); Response.End(); } [/code]
Jerry Hong 2009-08-03 16:55
You can also using [b]UPDLOCK[/b]or other lock to do the [b]pessimistic lock[/b]. before doing this, you maybe need to set an proper value of [b]lock_timeout[/b]. begin tran a select * from sequenceCustomer[b](UPDLOCK)[/b] where id=... uncommit the tran, and another user select the same row and want to edit it, and it will throw exception.
Jerry Hong 2009-08-03 16:45
Some useful command for handling deadlocks: set lock_timeout [b]your_time_in_millisecond[/b] set deadlock_priority [b]high/normal/low...[/b] [b]It's so important to keep your accessing order the same in different sp or sql statements for it can avoid lots of deadlocks than you can image.[/b] reference in MSDN: [url=http://technet.microsoft.com/en-us/library/cc917674.aspx#XSLTsection122121120120]http://technet.microsoft.com/en-us/library/cc917674.aspx#XSLTsection122121120120[/url]
共10页: 1 2 3 4 5 6 7 8 9 下一页 末页