private void btnEdit_Click(object sender, RoutedEventArgs e) { Storyboard sb; if (_isExpanded != true) { sb = this.FindResource("gridin") as Storyboard; sb.Begin(this); _isExpanded = !_isExpanded; } var selectedsales = dcMarketingStrategiesList.SelectedItem as MarketingStrategy; if (selectedsales != null) { MarketingStrategiesForm.MarketingStrategiesId= selectedsales.MarketingStrategyId; var page = new MarketingStrategiesForm(); navigation.Navigate(page); } else { NullMessage(); } }
//private void btnView_Click(object sender, RoutedEventArgs e) //{ // var selectedstage = dcMarketingStrategiesList.SelectedItem as MarketingStrategy; // Storyboard sb; // if (_isExpanded != true && selectedstage != null) // { // SalesStageDetails.SalesStageId = selectedstage.SalesStageID; // sb = this.FindResource("gridin") as Storyboard; // sb.Begin(this); // _isExpanded = !_isExpanded; // var page = new SalesStageDetails(); // navigation.Navigate(page); // } // else // { // sb = this.FindResource("gridout") as Storyboard; // sb.Begin(this); // _isExpanded = !_isExpanded; // LoadActivity(); // } //} private void btnAdd_Click(object sender, RoutedEventArgs e) { MarketingStrategiesForm.MarketingStrategiesId = 0; Storyboard sb; if (_isExpanded != true) { sb = this.FindResource("gridin") as Storyboard; sb.Begin(this); _isExpanded = !_isExpanded; } var page = new MarketingStrategiesForm(); navigation.Navigate(page); }