您目前尚未登陆,请选择【登陆】或【注册
首页->行政办公->固定资产管理系统源码>>DepreciationManage/SumDepreciationForm.aspx.cs>>代码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,不能展示项目的全部,如果想更进一步了解该代码请下载:固定资产管理系统源码


当前文件路径:DepreciationManage/DepreciationManage/SumDepreciationForm.aspx.cs 文件类型
普通视图
		            
1//文件名:SumDepreciationForm.aspx.cs 2using System; 3using System.Data; 4using System.Configuration; 5using System.Collections; 6using System.Web; 7using System.Web.Security; 8using System.Web.UI; 9using System.Web.UI.WebControls; 10using System.Web.UI.WebControls.WebParts; 11using System.Web.UI.HtmlControls; 12 13using System.Data.SqlClient; 14public partial class DepreciationManage_SumDepreciationForm : System.Web.UI.Page 15{ 16 protected void Page_Load(object sender, EventArgs e) 17 { 18 string MyForbidString = Session["MyForbid"].ToString(); 19 if (MyForbidString.IndexOf("B3") > 1) 20 { 21 Server.Transfer("~/SystemManage/AllErrorHelp.aspx"); 22 } 23 } 24 protected void Button1_Click(object sender, EventArgs e) 25 {//查询累计折旧 26 string MyConnectionString = ConfigurationManager.ConnectionStrings["MyAssetsDBConnectionString"].ConnectionString; ; 27 SqlConnection MyConnection = new SqlConnection(MyConnectionString); 28 MyConnection.Open(); 29 DataTable MyQueryTable = new DataTable(); 30 string MySQL = "SELECT 基本档案.使用部门 AS 使用部门, SUM(基本档案.资产原值) AS 资产原值, SUM(基本档案.累计折旧) AS 累计折旧, SUM(累计折旧表.月度折旧额) AS 月度折旧额 FROM 基本档案 INNER JOIN 累计折旧表 ON 基本档案.资产编号 = 累计折旧表.资产编号 WHERE (折旧年份 =" + this.DropDownList1.SelectedValue.ToString() + ") AND (折旧月份=" + this.DropDownList2.SelectedValue.ToString() + ") GROUP BY 基本档案.使用部门"; 31 SqlDataAdapter MyAdapter = new SqlDataAdapter(MySQL, MyConnection); 32 MyAdapter.Fill(MyQueryTable); 33 this.GridView1.DataSource = MyQueryTable; 34 this.GridView1.DataBind(); 35 if (MyConnection.State == ConnectionState.Open) 36 { 37 MyConnection.Close(); 38 } 39 } 40 protected void Button2_Click(object sender, EventArgs e) 41 {//打印部门累计折旧汇总信息 42 Server.Transfer("~/DepreciationManage/SumDepreciationPrint.aspx"); 43 } 44 public string MyPrintSQL 45 {//设置要传递到打印页的数据 46 get 47 { 48 return "SELECT 基本档案.使用部门 AS 使用部门, SUM(基本档案.资产原值) AS 资产原值, SUM(基本档案.累计折旧) AS 累计折旧, SUM(累计折旧表.月度折旧额) AS 月度折旧额 FROM 基本档案 INNER JOIN 累计折旧表 ON 基本档案.资产编号 = 累计折旧表.资产编号 WHERE (折旧年份 =" + this.DropDownList1.SelectedValue.ToString() + ") AND (折旧月份=" + this.DropDownList2.SelectedValue.ToString() + ") GROUP BY 基本档案.使用部门"; 49 } 50 } 51 public String MyPrintDate 52 {//设置要传递到打印页的数据 53 get 54 { 55 return "计提日期:" + this.DropDownList1.SelectedValue.ToString() + "" + this.DropDownList2.SelectedValue.ToString() + ""; 56 } 57 } 58 public String MyPrintTitle 59 {//设置要传递到打印页的数据 60 get 61 { 62 return Session["MyCompanyName"].ToString() + "月度累计折旧汇总表"; 63 } 64 } 65} 66
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:固定资产管理系统源码

- 智能选课系统源码

- 文献检索系统源码及毕业论文

- 逐迹(AspxNuke)CMS v2.0.0.3源码

- 在线订票系统源码(毕业设计)

- 三只熊网络商城1.3

- Asp.net简单试题库管理系统源码

- TreeView实现复选联动及Grid..

- 拍宝网B2B(仿淘宝)整站源码

51Aspx.com 版权所有 CopyRight © 2000-2008. 京ICP备06046876号