private void grvRestaurants_MasterRowGetChildList(object sender, MasterRowGetChildListEventArgs e) { var gridView = sender as GridView; var currentRow = gridView.GetRow(e.RowHandle) as Logic.Entities.Restaurant; e.ChildList = _menuServiceClient.GetMenusByRestaurant(currentRow.Id); }
private void lookUpRestaurantRepository_EditValueChanged(object sender, EventArgs e) { var lookUp = sender as LookUpEdit; var lookUpValue = lookUp.EditValue.ToString(); if (string.IsNullOrEmpty(lookUpValue)) { lookUpValue = "0"; } var restaurantId = Int32.Parse(lookUpValue); menuLookupBindingSource.DataSource = _menuServiceClient.GetMenusByRestaurant(restaurantId); }