02 2012 档案
c#获得本月份是本季度的第几个月
摘要:public int GetMonthOfQuarter(int month) { int num = month % 3; if (num == 0) { return 3; } return num; }有更好的算法欢迎各位留言拍砖 转载请注明出处 阅读全文
posted @ 2012-02-28 17:55 深海大虾 编辑
C#如何把月份转换成季度
摘要:public int ConvertMonthToQuarter(int month) { double f = Convert.ToDouble(month)/3f; if (f > Convert.ToInt32(f)) { return Convert.ToInt32(f) + 1; } return Convert.ToInt32(f); }欢迎路过的各位前来拍砖留言发表更简洁性能更高的算法,我会在第一... 阅读全文
posted @ 2012-02-28 17:43 深海大虾 编辑
如何通过JS获取用户本地图片路径
摘要:直接上代码 记录一下 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <meta http-equiv="Content-Type" content="t 阅读全文
posted @ 2012-02-16 15:35 深海大虾 编辑
asp.net控件如何同时绑定多个字段
摘要:直接上代码<uc2:ProcessHyperLink ID="ProcessHyperLink3" runat="server" Text='<%#(Eval("流程编码").ToString()+"-"+Eval("流程名称").ToString())%>' Value='<%#Eval("Id")%>' /> 阅读全文
posted @ 2012-02-15 18:02 深海大虾 编辑
C#不常见的语法
摘要:今天工作遇到4.0新增语法 不解 请教 遂知:指定参数public DataTable TodayToTable(int userId) { return userId > 0 ? V_CN_TASK_VALID_SCORING_TODAY.QueryTable(condition: " WHERE 承接者Id = " + userId) : null; }其中的condition: " WHERE 承接者Id = " + userId就是指定参数 condition是QueryTable方法的参数/// <summary> //... 阅读全文
posted @ 2012-02-13 15:17 深海大虾 编辑

点击右上角即可分享
微信分享提示