EquipmentManagement/Admin/Select_ServiceInfo.aspx.cs

(开头部分) 8KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Data;
using System.Data.SqlClient;
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 Data_Control;
using OWC;

public partial class Admin_Select_ServiceInfo : System.Web.UI.Page
{
    protected int CountRows;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            string sql = "Select EquiStyleID as bm,EquiStyleName as nr from EquiStyle";

            DDL_BindData(sql, DDL_Sbzl);
        }
        BindDataGrid();
        ShowStats();
    }

    private void DDL_BindData(string strSQL, DropDownList DDL)
    {
        AddEquiDB my = new AddEquiDB();
        SqlConnection conn = my.GetConn();
        conn.Open();
        SqlCommand cmd = new SqlCommand(strSQL, conn);
        DDL.DataSource = cmd.ExecuteReader();
        DDL.DataTextField = "nr";
        DDL.DataValueField = "bm";
        DDL.DataBind();
        DDL.Items.Insert(0, new ListItem("全部", ""));
        conn.Close();
    }
    protected void Ok_Click(object sender, EventArgs e)
    {
        BindDataGrid();
        ShowStats();
    }

    private void BindDataGrid()
    {
        string sql = "select b.EquipmentID as id,a.ServiceID as 维护编号,b.EquiModel as 设备型号,c.EquiStyleName as 设备种类,a.ServicePerson as 维修人,a.ServiceFare as 维修费用 " +
            "from ServiceInfo a,Equipment b,EquiStyle c "+
            "where a.EquipmentID=b.EquipmentID and b.EquiStyleID=c.EquiStyleID";
        if (classid.Value != "")
        {
            sql += " and b.EquipmentID=" + Convert.ToInt32(classid.Value);
        }
        if (DDL_Sbzl.SelectedValue != "")
        {
            sql += " and c.EquiStyleID=" + Convert.ToString(DDL_Sbzl.SelectedValue) + "";
后面还有 187 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。