예제 #1
0
 // list the orders that happened between specified dates
 protected void byDateGo_Click(object sender, EventArgs e)
 {
     // check if the page is valid (we have date validator controls)
     if ((Page.IsValid) && (startDateTextBox.Text + endDateTextBox.Text != ""))
     {
         // get the dates
         string startDate = startDateTextBox.Text;
         string endDate   = endDateTextBox.Text;
         // load the grid with the requested data
         grid.DataSource = OrdersAccess.GetByDate(startDate, endDate);
     }
     else
     {
         errorLabel.Text = "Моля въведете валидни дати!";
     }
     // refresh the data grid
     grid.DataBind();
 }
예제 #2
0
 // list the orders that happened between specified dates
 protected void byDateGo_Click(object sender, EventArgs e)
 {
     // check if the page is valid (we have date validator controls)
     if ((Page.IsValid) && (startDateTextBox.Text + endDateTextBox.Text != ""))
     {
         // get the dates
         string startDate = startDateTextBox.Text;
         string endDate   = endDateTextBox.Text;
         // load the grid with the requested data
         grid.DataSource = OrdersAccess.GetByDate(startDate, endDate);
     }
     else
     {
         errorLabel.Text = "<br />Please enter valid dates!";
     }
     // refresh the data grid
     grid.DataBind();
     // no order is selected
     Session["AdminOrderID"] = null;
 }