Ejemplo n.º 1
0
    protected void btnGotoUpdate_Click(object sender, EventArgs e)
    {
        //create an object
        clsOrder order = new clsOrder();

        //Check if string could be convert to int
        if (CheckIfInt(tbxOrderNo.Text) == false)
        {
            lblError.Text = "Please enter an integer";
        }
        //Check if the orderNo is exist
        else if (order.FilterByOrderNoAndCustomerNo(Convert.ToInt32(tbxOrderNo.Text), CustomerNo) == false)
        {
            lblError.Text = "Could not find this OrderNo in your account.";
        }
        //Check if the parcel was Dispatching or Dispathched
        else if (order.Status == "Dispatching" || order.Status == "Dispatched" || order.Status == "Cancel")
        {
            lblError.Text = "The Percel was Dispatching, Dispatched or Cancel.";
        }
        else
        {
            //Store the OrderNo in to Sec
            Sec.OrderNo = Convert.ToInt32(tbxOrderNo.Text);
            //go to Update
            Response.Redirect("Update.aspx");
        }
    }