Exemple #1
0
        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"));
        }
Exemple #2
0
        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);
            }
        }
Exemple #3
0
        //
        // GET: /Customer/

        public ActionResult Index()
        {
            var customerListDTOs = _customerAppService.FindAllCustomers();

            // fill view model
            var customerListVM = CustomerListVM.FillViewModel(customerListDTOs);

            // call view
            return(View("Index", customerListVM));
        }
Exemple #4
0
        private void myRadDataForm_EditEnding(object sender, EditEndingEventArgs e)
        {
            CustomerListVM dataContext = this.DataContext as CustomerListVM;

            UIHelper.AddOrUpdateRecord(myRadDataForm, dataContext, e);
        }
Exemple #5
0
 public string Search(CustomerListVM vm)
 {
     return(vm.GetJson(false));
 }
Exemple #6
0
 //public CustomerListVM listVM { get; set; } = new CustomerListVM();
 public CustomerListPage()
 {
     InitializeComponent();
     DataContext = new CustomerListVM();
 }
Exemple #7
0
 public StoreOutVM()
 {
     SelcetCustomerListVm = new CustomerListVM();
     SetInclude(x => x.Location);
     SetInclude(x => x.Customer);
 }
Exemple #8
0
 public IActionResult ExportExcel(CustomerListVM vm)
 {
     return(vm.GetExportData());
 }