Ejemplo n.º 1
0
 private void MainRowList_OnRefresh(object sender, RefreshEventArgs e)
 {
     if (!Loading)
     {
         SmlCollection.Clear();
         SortBy = null;
         foreach (var sortDesc in SmlCollection.SortDescriptions)
         {
             SortBy = SortBy + "it." + sortDesc.PropertyName + (sortDesc.Direction == ListSortDirection.Ascending ? " ASC" : " DESC");
         }
         GetMaindata();
     }
 }
Ejemplo n.º 2
0
 private void NewDetail()
 {
     if (SmlCollection.Any())
     {
         var valiationCollection = new List <ValidationResult>();
         var isvalid             = Validator.TryValidateObject(SmlCollection[SmlCollection.Count - 1],
                                                               new ValidationContext(SmlCollection[SmlCollection.Count - 1], null, null), valiationCollection, true);
         if (!isvalid)
         {
             return;
         }
     }
     SmlCollection.Add(new SeasonalMasterListViewModel
     {
         ParentObj  = this,
         SeasonCode = SelectedSeason != null ? SelectedSeason.Code : null,
         BrandCode  = SelectedBrand != null ? SelectedBrand.Brand_Code : null,
         ObjStatus  = new ObjectStatus {
             IsNew = true, IsEmpty = true, IsSavedDBItem = false
         }
     });
 }