123
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
public partial class clhy_chehuizong : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
Tools.yanzheng();
string b = Session["zhanghao"].ToString();
bool quanxian = Tools.Exists_Purview(b, "chehuizong");
if (quanxian == false)
{
Response.Write("<script language=javascript>alert('您无此权限!');history.back()</script>");
}
Type_List type_list = new Type_List();
DataTable dt = type_list.Department_type().Tables[0];
DropDownList1.DataSource = dt;
DropDownList1.DataValueField = dt.Columns[0].ColumnName;
DropDownList1.DataTextField = dt.Columns[0].ColumnName;
DropDownList1.DataBind();
}
}
protected void Button1_Click(object sender, EventArgs e)
{
if (DropDownList3.Text.Trim() == "汇总")
{
CarRun carrun = new CarRun();
CarRun_ carrun_ = new CarRun_();
carrun.Department = DropDownList1.Text.Trim() + DropDownList2.Text.Trim();
carrun.StartTime = Tools.MyFormatstr(TextBox1.Text.Trim());
carrun.EndTime = Tools.MyFormatstr(TextBox2.Text.Trim());
GridView1.DataSource = carrun_.Car_Driving_Summary(carrun);
GridView1.DataBind();
}
else
{
CarRun carrun = new CarRun();
CarRun_ carrun_ = new CarRun_();
carrun.Department = DropDownList1.Text.Trim() + DropDownList2.Text.Trim();
carrun.StartTime = Tools.MyFormatstr(TextBox1.Text.Trim());
carrun.EndTime = Tools.MyFormatstr(TextBox2.Text.Trim());
GridView1.DataSource = carrun_.Car_Driving_Summary_List(carrun);
GridView1.DataBind();
}
}
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
Department department = new Department();
department.Department_Type = DropDownList1.Text.Trim();
Type_List type_list = new Type_List();
DataTable dt = type_list.Lesson_Inquires(department);
DropDownList2.DataSource = dt;
DropDownList2.DataValueField = dt.Columns[0].ColumnName;
DropDownList2.DataTextField = dt.Columns[0].ColumnName;
DropDownList2.DataBind();
}
}
浙公网安备 33010602011771号