public ActionResult Upload() { var model = new LogFileViewModel { Scanners = _scannerService.GetAll().ToDictionary(a => a.Id, a => a.Name) }; return(PartialView("_Upload", model)); }
public ActionResult Upload(LogFileViewModel model) { if (ModelState.IsValid && model.LogFile.ContentLength > 0) { var path = Path.Combine(MainSettings.UploadFolder, string.Format("data-{0:yyyy-MM-dd_hh-mm-ss-tt}.log", DateTime.Now)); //backup file model.LogFile.SaveAs(path); //import file _scannerService.Import(model.ScannerId, path); } return(RedirectToAction("Index")); }
public LogFileUpdateCommand(LogFileViewModel viewModel) { _viewModel = viewModel; }
public int SaveLogFile(LogFileViewModel model) { var service = new LogsService(); return(service.SaveLogFile(model.Filename, model.FileContent)); }
public MainWindow() { InitializeComponent(); DataContext = new LogFileViewModel(); }
public LogFileView() { this.InitializeComponent(); this.DataContext = this.ViewModel = new(this); }
/// <summary> /// Menus the click. /// </summary> /// <param name="arg">The argument.</param> private void MenuClick(object arg) { StatusMessage = Utilities.GetResourceValue("Loading"); switch ((string)arg) { case "Dashboard": Element = new StartupViewModel(this); break; case "EcommerceDashboard": Element = new Dashboard.Ecommerce.EcommerceViewModel(); break; case "EcommerceDashboard1": Element = new Dashboard.Ecommerce.EcommerceViewModel(1); break; case "ErpDashBoard": Element = new Dashboard.Erp.ErpViewModel(); break; case "ErpDashBoard1": Element = new Dashboard.Erp.ErpViewModel(1); break; case "SchedulerControl": Element = new Schedulers.SchedulersViewModel(); break; case "Logfiles": Element = new LogFileViewModel(); break; case "ConfigurationSettings": Element = new Configuration.ConfigurationSettingsViewModel(this); break; case "NotificationSettings": Element = new Configuration.NotificationViewModel(); break; case "ShipmentSettings": Element = new Configuration.ShipmentSettingsViewModel(); break; case "CarrierSettings": Element = new Configuration.ShippingCarrierViewModel(); break; case "PaymentSettings": Element = new Configuration.PaymentSettingsViewModel(); break; case "DocumentTypes": Element = new Configuration.DocumentTypesViewModel(); break; case "NotificationReports": Element = new Reports.ReportViewModel(); break; case "ExclusionReports": Element = new Reports.ReportViewModel(1); break; case "AdminConfig": Element = new Admin.ConfigurationViewModel(); break; case "CategoryMaster": Element = new Admin.CategoryMasterViewModel(); break; case "CategoryMapping": Element = new Admin.CategoryMappingViewModel(); break; case "Diagnostics": Element = new Admin.DiagnosticsViewModel(); break; case "Blank": Element = new BlankViewModel(); break; } StatusMessage = Utilities.GetResourceValue("DefaultStatus"); }