protected void Page_Load(object sender, EventArgs e) { GridMenu.DataSource = Burgerconn.Menus.ToList(); GridMenu.DataBind(); GridOrder.DataSource = Burgerconn.Orders.ToList(); GridOrder.DataBind(); }
protected void ordercomplete_Click(object sender, EventArgs e) { objburger.Orderemove(Convert.ToInt32(burgerid.Text)); GridMenu.DataSource = Burgerconn.Menus.ToList(); GridMenu.DataBind(); GridOrder.DataSource = Burgerconn.Orders.ToList(); GridOrder.DataBind(); orderup = 0; }
protected void orderupdate_Click(object sender, EventArgs e) { objburger.OrderUpdate(Convert.ToInt32(burgerid.Text), BurgerName.Text, Order1.Text, Order2.Text, Order3.Text, OrderMobile.Text); GridMenu.DataSource = Burgerconn.Menus.ToList(); GridMenu.DataBind(); GridOrder.DataSource = Burgerconn.Orders.ToList(); GridOrder.DataBind(); orderup = 0; }
protected void Ordertake_Click(object sender, EventArgs e) { objburger.TAkeorder(BurgerName.Text, Order1.Text, Order2.Text, Order3.Text, OrderMobile.Text); GridMenu.DataSource = Burgerconn.Menus.ToList(); GridMenu.DataBind(); GridOrder.DataSource = Burgerconn.Orders.ToList(); GridOrder.DataBind(); orderup = 0; }
protected void IniGrid() { Maticsoft.BLL.tAbout BLL = new Maticsoft.BLL.tAbout(); DataTable table = null; table = BLL.GetList(" Id >0 order by Sort desc").Tables[0]; GridMenu.DataSource = table; GridMenu.DataBind(); }
protected void IniGrid() { Maticsoft.BLL.tArticleType BLL = new Maticsoft.BLL.tArticleType(); DataTable table = null; if (ddlfatherId.SelectedValue == "") { table = BLL.GetList(" Id >0 order by FatherID,Sort desc").Tables[0]; } else { table = BLL.GetList(string.Format(" FatherID={0} order by FatherID, Sort desc", ddlfatherId.SelectedValue)).Tables[0]; } GridMenu.DataSource = table; GridMenu.DataBind(); }
public void SQLconnections(string veg, string nonveg, string query, string Address) { using (SqlConnection connection = new SqlConnection(Address)) { //Selects query accourding to conditions using (SqlCommand menuCmd = new SqlCommand(query)) { menuCmd.CommandType = CommandType.Text; menuCmd.Connection = connection; connection.Open(); menuCmd.Parameters.AddWithValue("@Rest", LblName.Text); SqlDataReader ReadFromTable = menuCmd.ExecuteReader(); GridMenu.DataSource = ReadFromTable; GridMenu.DataBind(); } } }