public IActionResult ExportExcel(CustomerListVM vm) { vm.SearcherMode = vm.Ids != null && vm.Ids.Count > 0 ? ListVMSearchModeEnum.CheckExport : ListVMSearchModeEnum.Export; var data = vm.GenerateExcel(); return(File(data, "application/vnd.ms-excel", $"Export_Customer_{DateTime.Now.ToString("yyyy-MM-dd")}.xls")); }
private void myRadDataForm_DeletingItem(object sender, System.ComponentModel.CancelEventArgs e) { var confirm = MessageBox.Show("删除客户信息将同时删除该客户和相关软件的对应关系,\n请确认是否真的要删除?", "注意", MessageBoxButton.YesNo); if (confirm == MessageBoxResult.Yes) { CustomerListVM dataContext = this.DataContext as CustomerListVM; UIHelper.DeleteRecord(myRadDataForm, dataContext, e); } }
// // GET: /Customer/ public ActionResult Index() { var customerListDTOs = _customerAppService.FindAllCustomers(); // fill view model var customerListVM = CustomerListVM.FillViewModel(customerListDTOs); // call view return(View("Index", customerListVM)); }
private void myRadDataForm_EditEnding(object sender, EditEndingEventArgs e) { CustomerListVM dataContext = this.DataContext as CustomerListVM; UIHelper.AddOrUpdateRecord(myRadDataForm, dataContext, e); }
public string Search(CustomerListVM vm) { return(vm.GetJson(false)); }
//public CustomerListVM listVM { get; set; } = new CustomerListVM(); public CustomerListPage() { InitializeComponent(); DataContext = new CustomerListVM(); }
public StoreOutVM() { SelcetCustomerListVm = new CustomerListVM(); SetInclude(x => x.Location); SetInclude(x => x.Customer); }
public IActionResult ExportExcel(CustomerListVM vm) { return(vm.GetExportData()); }