private void Button_Click(object sender, RoutedEventArgs e) { try { Shipping shipupdate = new Shipping(); if (!String.IsNullOrEmpty(shipnum.Text)) { shipupdate.ShippingNumber = Convert.ToInt32(shipnum.Text); } /// shipupdate.OrderId = Convert.ToInt32(shiporderid.Text); if (!String.IsNullOrEmpty(expdate.Text)) { shipupdate.ExpectedDeliveryDate = Convert.ToDateTime(expdate.Text); } else { MessageBox.Show("Please select valid date."); return; } AdminShippingBL ShipValidations = new AdminShippingBL(); bool updateresult = ShipValidations.UpdateAdminShippingBL(shipupdate); if (updateresult == true) { Clear(); MessageBox.Show("Updated successfully !"); } else { MessageBox.Show("Not Updated !"); } } catch (RecipeIngredientSystemExceptions ex) // { // System.Windows.MessageBox.Show(ex.Message); // }// }
private void Button_Click_1(object sender, RoutedEventArgs e) { AdminShippingBL ShipValidations = new AdminShippingBL(); datagrid.ItemsSource = ShipValidations.GetAdminShiipingBL(); }