protected void btn_submit_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(txt_destination.Text) && !string.IsNullOrEmpty(txt_table.Text)) { if (bll.CheckedTable(txt_table.Text) && bll.EmptyTable(txt_destination.Text)) { Response.Write("<script>alert('" + bll.changeTable(txt_table.Text, txt_destination.Text) + " !')</script>"); Response.Write("<script>alert('change table success !')</script>"); LoadDB(); } else if (bll.EmptyTable(txt_destination.Text) == false) { Response.Write("<script>alert('the destination is not exist !')</script>"); } else if (bll.CheckedTable(txt_table.Text) == false) { Response.Write("<script>alert('the original table is not exist !')</script>"); } else { Response.Write("<script>alert('wrong input !')</script>"); } } else { Response.Write("<script>alert( 'table number is not null !')</script>"); } }
protected void ImageButton1_Click(object sender, ImageClickEventArgs e) { if (bll.CheckedTable(txt_number.Text)) { if (bll.CreateOrderDetails(txt_number.Text, ((ImageButton)sender).CommandArgument.ToString()) > 0) { LoadMenuDB(); } } else { Response.Write("<script>alert('the table is not select !')</script>"); } }
protected void btn_search_Click(object sender, EventArgs e) { if (bll.CheckedTable(txt_number.Text)) { LoadDB(); lbl_total.Text = bll.total(txt_number.Text).ToString(); } else { LoadDB(); Response.Write("<script>alert('the number is not exists !')</script>"); } }