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

📄 repairdrawprint.aspx.cs

📁 ASP.NET 2.0 C# +MYSQL 家电维修管理系统 功能还算齐全
💻 CS
字号:
//文件名:RepairDrawPrint.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 RepairManage_RepairDrawPrint : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {//将查询结果输出到Excel文件中
        this.Label1.Text = Session["MyServiceName"].ToString() + "家电修理签收凭证";
        this.Label3.Text = "维修编号:" + Response.Cookies["My维修编号"].Value.ToString();
        this.Label4.Text = "客户名称:" + Response.Cookies["My客户名称"].Value.ToString();
        DataTable MyTable = new DataTable();
        String MySQLConnectionString = ConfigurationManager.ConnectionStrings["MyServiceDBConnectionString"].ConnectionString;
        SqlConnection MyConnection = new SqlConnection(MySQLConnectionString);
        MyConnection.Open();
        string MySQL = "SELECT * FROM [维修登记] WHERE ([维修编号]='" + Response.Cookies["My维修编号"].Value.ToString() + "')";
        SqlDataAdapter MyAdatper = new SqlDataAdapter(MySQL, MyConnection);
        MyAdatper.Fill(MyTable);
        this.Label5.Text = "客户电话:" + MyTable.Rows[0][11].ToString();
        this.Label7.Text = "产品品牌:" + MyTable.Rows[0][4].ToString();
        this.Label8.Text = "产品型号:" + MyTable.Rows[0][5].ToString();
        this.Label12.Text = "机身号码:" + MyTable.Rows[0][6].ToString();
        this.Label14.Text = "故障原因:" + MyTable.Rows[0]["故障情况"].ToString();

        MyTable = new DataTable();
        MySQL = "SELECT * FROM [完修登记] WHERE ([维修编号]='" + Response.Cookies["My维修编号"].Value.ToString() + "')";
        MyAdatper = new SqlDataAdapter(MySQL, MyConnection);
        MyAdatper.Fill(MyTable);
        this.Label6.Text = "修理结果:" + MyTable.Rows[0]["修理结果"].ToString();

        MyTable = new DataTable();
        MySQL = "SELECT * FROM [签收登记] WHERE ([维修编号]='" + Response.Cookies["My维修编号"].Value.ToString() + "')";
        MyAdatper = new SqlDataAdapter(MySQL, MyConnection);
        MyAdatper.Fill(MyTable);
        this.Label9.Text = "维修费用:" + MyTable.Rows[0]["维修费用"].ToString()+"元";
        this.Label10.Text = "零件费用:" + MyTable.Rows[0]["零件费用"].ToString() + "元";
        this.Label11.Text = "预收费用:" + MyTable.Rows[0]["预收费用"].ToString() + "元";
        this.Label13.Text = "补收费用:" + MyTable.Rows[0]["补收费用"].ToString() + "元";
        this.Label2.Text = "签收日期:" + DateTime.Parse(MyTable.Rows[0]["签收日期"].ToString()).ToShortDateString();
        this.Label15.Text = "签收人员:" + MyTable.Rows[0]["签收人员"].ToString();
        this.Label16.Text = "补充说明:" + MyTable.Rows[0]["补充说明"].ToString();

        MyTable = new DataTable();
        MySQL = "SELECT 配件名称 as 零件名称,规格型号,计量单位,领用数量,计费单价,计费金额 FROM [配件领用] WHERE ([维修编号]='" + Response.Cookies["My维修编号"].Value.ToString() + "')";
        MyAdatper = new SqlDataAdapter(MySQL, MyConnection);
        MyAdatper.Fill(MyTable);
        this.GridView1.DataSource= MyTable;
        this.GridView1.DataBind();
    }
}

⌨️ 快捷键说明

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