Esempio n. 1
0
 public DefRoom(Main M, Rooms_El_4 currRoom, EL_4 El4Ref)
 {
     this.currRoom = currRoom;
     this.EL4Ref = El4Ref;
     this.M = M;
     InitializeComponent();
 }
Esempio n. 2
0
 private void NewObject_Click(object sender, EventArgs e)
 {
     Database.SetInitializer(new MigrateDatabaseToLatestVersion<NPLabDbContext, Configuration>());
     //var db = new NPLabDbContext();
     Objects obj = new Objects();
     db.Object.Add(obj);
     db.SaveChanges();
     Main M = new Main(obj.Id, this);
     M.Show();
     M.Focus();
     this.Hide();
 }
Esempio n. 3
0
 public ImpRoom(Main M, Rooms currRoom, El_2 El2Ref, int sector, int floor, int room, bool isNew)
 {
     this.currRoom = currRoom;
     //this.currRoom.ListOfInstallations.Clear();
     this.EL2Ref = El2Ref;
     this.M = M;
     this.sector = sector;
     this.floor = floor;
     this.room = room;
     this.isNew = isNew;
     InitializeComponent();
 }
Esempio n. 4
0
 private void Load_Click(object sender, EventArgs e)
 {
     Database.SetInitializer(new MigrateDatabaseToLatestVersion<NPLabDbContext, Configuration>());
     var db = new NPLabDbContext();
     if (ListObjects.SelectedIndex == -1) { MessageBox.Show("Не сте избрали обект"); return; }
     int toLoad;
     try
     {
         toLoad = (from p in db.Object
                   where p.ObjectName == ListObjects.SelectedItem.ToString()
                   select p.Id).First();
     }
     catch { MessageBox.Show("Грешка! Не съществува такъв обект"); return; }
     Main M = new Main(toLoad, H);
     M.Show();
     M.Focus();
     this.Close();
 }
Esempio n. 5
0
 public EditProtectors(Main M)
 {
     this.M = M;
     InitializeComponent();
 }