public MaintenanceView(vwClinicMaintenance maintenance)
        {
            InitializeComponent();
            this.maintenance = maintenance;
            this.DataContext = new MaintenanceViewModel(this, maintenance);

            var menuReport = new List <SubItem>();

            menuReport.Add(new SubItem("View reports", new ReportsView(maintenance)));
            var item1 = new ItemMenu("Reports", menuReport, PackIconKind.File);

            var item0 = new ItemMenu("", new UserControl(), PackIconKind.ViewDashboard);

            Menu.Children.Add(new UserControlMenuItem(item0, this));
            Menu.Children.Add(new UserControlMenuItem(item1, this));
        }
Ejemplo n.º 2
0
 public MaintenanceEditFormViewModel(MaintenanceEditFormView maintenanceView, vwClinicMaintenance maintenanceToEdit)
 {
     this.maintenanceView = maintenanceView;
     ClinicMaintenance    = maintenanceToEdit;
     GenderList           = genders.GetGenders();
     OldMaintenance       = new vwClinicMaintenance
     {
         Citizenship              = maintenanceToEdit.Citizenship,
         DateOfBirth              = maintenanceToEdit.DateOfBirth,
         Gender                   = maintenanceToEdit.Gender,
         IdentityCardNumber       = maintenanceToEdit.IdentityCardNumber,
         NameAndSurname           = maintenanceToEdit.NameAndSurname,
         Password                 = maintenanceToEdit.Password,
         PermissionToExpandClinic = maintenanceToEdit.PermissionToExpandClinic,
         ResponsibleForAccessibilityOfInvalids = maintenanceToEdit.ResponsibleForAccessibilityOfInvalids,
         Username = maintenanceToEdit.Username
     };
 }
 public MaintenanceViewModel(MaintenanceView maintenanceView, vwClinicMaintenance maintenance)
 {
     this.maintenanceView = maintenanceView;
     Maintenance          = maintenance;
 }
 public MaintenanceEditFormView(vwClinicMaintenance maintenance)
 {
     InitializeComponent();
     this.Name        = "Maintenances";
     this.DataContext = new MaintenanceEditFormViewModel(this, maintenance);
 }
Ejemplo n.º 5
0
 public AddReportViewModel(AddReportView reportView, vwClinicMaintenance maintenance)
 {
     this.reportView = reportView;
     Maintenance     = maintenance;
     Date            = DateTime.Now.ToShortDateString();
 }
Ejemplo n.º 6
0
 public ReportsViewModel(ReportsView reportView, vwClinicMaintenance maintenance)
 {
     this.reportView = reportView;
     Maintenance     = maintenance;
     GetReports();
 }
 public MaintenanceAddFormViewModel(MaintenanceAddFormView maintenanceView)
 {
     this.maintenanceView = maintenanceView;
     ClinicMaintenance    = new vwClinicMaintenance();
     GenderList           = genders.GetGenders();
 }
Ejemplo n.º 8
0
 public AddReportView(vwClinicMaintenance maintenance)
 {
     InitializeComponent();
     txtDate.Text     = DateTime.Now.ToShortDateString();
     this.DataContext = new AddReportViewModel(this, maintenance);
 }
 public ReportsView(vwClinicMaintenance maintenance)
 {
     InitializeComponent();
     this.Name        = "Reports";
     this.DataContext = new ReportsViewModel(this, maintenance);
 }