Пример #1
0
    protected void btnAdd_Click(object sender, EventArgs e)
    {
        AdminBusBiz biz = new AdminBusBiz();
        biz.AddBusUsage(VehicleId, DateTime.Parse(txtStartDate.Text), DateTime.Parse(txtEndDate.Text));

        lstBusUsage.DataBind();
    }
Пример #2
0
 protected void btnSave_Click(object sender, EventArgs e)
 {
     AdminBusBiz biz = new AdminBusBiz();
     D_BusInfo bi = this.BusInfo;
     if (bi.vehicleId < 0)
     {
         bi.vehicleId = biz.Add();
     }
     if (biz.Update(bi))
     {
         txtToolMessage.Text = "����ɹ���";
         txtToolMessage.ForeColor = System.Drawing.Color.DarkGreen;
         this.BusInfo = bi;
     }
     else
     {
         txtToolMessage.Text = "����ʧ�ܣ����顣";
         txtToolMessage.ForeColor = System.Drawing.Color.Red;
     }
 }
Пример #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["id"] == null)
            Response.Redirect("BusList.aspx");

        if (!Page.IsPostBack)
        {
            int vehicleId = int.Parse(Request.QueryString["id"]);
            AdminBusBiz biz = new AdminBusBiz();
            this.BusInfo = biz.GetVehicleDetail(vehicleId);
        }
    }
Пример #4
0
 protected void btnDelete_Click(object sender, EventArgs e)
 {
     AdminBusBiz biz = new AdminBusBiz();
     biz.Delete(this.BusInfo.vehicleId);
     Response.Redirect("BusList.aspx");
 }