コード例 #1
0
 public void SelectArranger()
 {
     if (SelectedSupply.ArrangerId != null)
     {
         Arranger = DataOpers.getUsers().Where(i => i.Id == SelectedSupply.ArrangerId).FirstOrDefault().FamName + " " +
                    DataOpers.getUsers().Where(i => i.Id == SelectedSupply.ArrangerId).FirstOrDefault().FirName;
     }
     else
     {
         Arranger = "Не оформлено";
     }
 }
コード例 #2
0
 public LoginViewModel(DbDataOperations db)
 {
     _viewId   = Guid.NewGuid();
     DataOpers = db;
     PosUsers  = DataOpers.getUsers();
     Status    = "Введите свои данные";
 }
コード例 #3
0
 public UpdateWindowViewModel(DbDataOperations DbOps, Supply sup, User CurUser)
 {
     this.DataOpers = DbOps;
     SelectedSupply = sup;
     //Lines = DataOpers.getSupplyLines(sup.Id);
     Title       = "Просмотр поставки";
     CurrentUser = CurUser;
     Applicant   = DataOpers.getUsers().Where(i => i.Id == sup.ApplicantId).FirstOrDefault().FamName + " " +
                   DataOpers.getUsers().Where(i => i.Id == sup.ApplicantId).FirstOrDefault().FirName;
     SelectArranger();
     SelectArrangementDate();
     Provider       = DataOpers.getProviders().Where(i => i.Id == sup.ProviderId).FirstOrDefault().CompanyName;
     Statuses       = DataOpers.getSupplyStatuses();
     SelectedStatus = Statuses.Where(i => i.Id == sup.StatusId).FirstOrDefault();
     StatusChanger  = 0;
     SetStatus();
     Warehouse = DataOpers.getWarehouses().Where(i => i.Id == sup.WarehouseId).FirstOrDefault().Address;
     fileMan   = new FileManager(DataOpers);
 }
コード例 #4
0
 public LoginViewModel()
 {
     _viewId = Guid.NewGuid();
     try
     {
         DataOpers = new DbDataOperations();
         PosUsers  = DataOpers.getUsers();
         Status    = "Введите свои данные";
     }
     catch (Exception ex)
     {
         MessageBox.Show("Произошла ошибка! " + ex.Message);
     }
 }