Exemplo n.º 1
0
 protected void btnSave_Click(object sender, EventArgs e)
 {
     if (txtPrice.Text != "" && txtName.Text != "")
     {
         MenuService.Item item = new MenuService.Item()
         {
             Name        = txtName.Text,
             Description = txtDesc.Text,
             Price       = Convert.ToInt32(txtPrice.Text),
             Category    = txtCg.Text,
             Status      = rbtnSt.SelectedItem.Text,
             Type        = rbtnTp.SelectedItem.Text
         };
         MenuService.Service1Client client = new MenuService.Service1Client();
     }
     else
     {
         lblMsg.Text      = "All fields are mandatory! ";
         lblMsg.ForeColor = System.Drawing.Color.Red;
     }
 }
Exemplo n.º 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     MenuService.Service1Client client = new MenuService.Service1Client();
     grdItems.DataSource = client.getItems();
     grdItems.DataBind();
 }