⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 reportdepartmentform.aspx.cs

📁 重庆某纸业公司的固定资产管理系统
💻 CS
字号:
//文件名:ReportDepartmentForm.aspx.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

using System.Data.SqlClient;
public partial class ReportManage_ReportDepartmentForm : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string MyForbidString = Session["MyForbid"].ToString();
        if (MyForbidString.IndexOf("D3") > 1)
        {
            Server.Transfer("~/SystemManage/AllErrorHelp.aspx");
        }
    }
    protected void Button1_Click(object sender, EventArgs e)
    {//查询固定资产信息`
        string MyConnectionString = ConfigurationManager.ConnectionStrings["MyAssetsDBConnectionString"].ConnectionString; ;
        string MySQL = "Select * From 可用固定资产视图 WHERE 使用部门 LIKE '" + this.DropDownList1.SelectedValue.ToString() + "'";
        SqlDataAdapter MyAdapter = new SqlDataAdapter(MySQL, MyConnectionString);
        DataTable MyFileTable = new DataTable();
        MyAdapter.Fill(MyFileTable);
        this.GridView1.DataSource = MyFileTable;
        this.GridView1.DataBind();
    }
    protected void Button2_Click(object sender, EventArgs e)
    {//打印固定资产信息
        Server.Transfer("~/ReportManage/ReportDepartmentPrint.aspx");
    }
    public string MyPrintSQL
    {//设置要传递到打印页的数据
        get
        {
            return "Select * From 可用固定资产视图 WHERE 使用部门 LIKE '" + this.DropDownList1.SelectedValue.ToString() + "'";
        }
    }
    public String MyPrintDate
    {//设置要传递到打印页的数据
        get
        {
            return "打印日期:"+DateTime.Now.ToShortDateString();
        }
    }
    public String MyPrintTitle
    {//设置要传递到打印页的数据
        get
        {
            return Session["MyCompanyName"].ToString() +this.DropDownList1.SelectedValue.ToString() +"固定资产统计表";
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -