private void FillDropdown() { try { ReportViewModel reportViewModel = new ReportViewModel(); List <ReportDropDownModel> reportDropDownModels = new List <ReportDropDownModel>(); reportDropDownModels = reportViewModel.GetDropdown("FoodmenuCategory"); cmbCategory.ItemsSource = reportDropDownModels; // cmbCategory.Text = " All"; cmbCategory.IsEditable = true; //cmbCategory.IsReadOnly = true; cmbCategory.SelectedValuePath = "Id"; cmbCategory.DisplayMemberPath = "Name"; reportDropDownModels = reportViewModel.GetDropdown("Foodmenu"); cmbProduct.ItemsSource = reportDropDownModels; // cmbProduct.Text = " All"; cmbProduct.IsEditable = true; //cmbProduct.IsReadOnly = true; cmbProduct.SelectedValuePath = "Id"; cmbProduct.DisplayMemberPath = "Name"; cmbCategory.SelectedValue = ReportDetail.CategoryId; cmbProduct.SelectedValue = ReportDetail.ProductId; } catch (Exception ex) { SystemError.Register(ex); } }