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

📄 reportcardform.aspx.cs

📁 重庆某纸业公司的固定资产管理系统
💻 CS
字号:
//文件名:ReportCardForm.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;
//该源码下载自www.51aspx.com(51aspx.com)

using System.Data.SqlClient;
public partial class ReportManage_ReportCardForm : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string MyForbidString = Session["MyForbid"].ToString();
        if (MyForbidString.IndexOf("D1") > 1)
        {
            Server.Transfer("~/SystemManage/AllErrorHelp.aspx");
        }
    }
    protected void Button1_Click(object sender, EventArgs e)
    {//查询固定资产信息
        string MyID = this.DropDownList3.SelectedValue.ToString();
        string MyConnectionString = ConfigurationManager.ConnectionStrings["MyAssetsDBConnectionString"].ConnectionString; ;
        string MySQL = "Select * From 基本档案 WHERE 资产编号 LIKE '" + MyID + "'";
        SqlDataAdapter MyAdapter = new SqlDataAdapter(MySQL, MyConnectionString);
        DataTable MyFileTable = new DataTable();
        MyAdapter.Fill(MyFileTable);
        this.GridView1.DataSource = MyFileTable;
        this.GridView1.DataBind();
        MySQL = "Select * From 附属设备 WHERE 资产编号 LIKE '" + MyID + "'";
        MyAdapter = new SqlDataAdapter(MySQL, MyConnectionString);
        DataTable MyFittingsTable = new DataTable();
        MyAdapter.Fill(MyFittingsTable);
        this.GridView2.DataSource = MyFittingsTable;
        this.GridView2.DataBind();
        MySQL = "Select * From 修理记录 WHERE 资产编号 LIKE '" + MyID + "'";
        MyAdapter = new SqlDataAdapter(MySQL, MyConnectionString);
        DataTable MyRepairTable = new DataTable();
        MyAdapter.Fill(MyRepairTable);
        this.GridView3.DataSource = MyRepairTable;
        this.GridView3.DataBind();
        MySQL = "Select * From 租借记录 WHERE 资产编号 LIKE '" + MyID + "'";
        MyAdapter = new SqlDataAdapter(MySQL, MyConnectionString);
        DataTable MyLeaseTable = new DataTable();
        MyAdapter.Fill(MyLeaseTable);
        this.GridView4.DataSource = MyLeaseTable;
        this.GridView4.DataBind();
    }
    protected void Button2_Click(object sender, EventArgs e)
    {//打印固定资产信息
        this.Response.Redirect("~/ReportManage/ReportCardPrint.aspx?MyID=" + this.DropDownList3.SelectedValue.ToString());
    }
}

⌨️ 快捷键说明

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