public Restoration(Exhibit tempExhibitWindow, ref DataSetMuseum tempDataset, ref ControlFunction tempConrolFunction) { InitializeComponent(); dataset = tempDataset; ExW = tempExhibitWindow; CFunc = tempConrolFunction; UpdateDataView(); photoPictureBox.SizeMode = PictureBoxSizeMode.Zoom; photoPictureBox.Image = Image.FromFile("Pictures/DefaultImage.jpg"); restorerComboBox.DataSource = dataset.Restorer; restorerComboBox.DisplayMember = "Name"; restorerComboBox.ValueMember = "ID"; RestorationListBox.DataSource = null; RestorationListBox.DisplayMember = "Name"; RestorationListBox.ValueMember = "ID"; RestorationRestorerComboBox.DataSource = null; RestorationRestorerComboBox.DisplayMember = "Name"; RestorationRestorerComboBox.ValueMember = "ID"; comboBoxExhibit.DataSource = null; comboBoxExhibit.DisplayMember = "Name"; comboBoxExhibit.ValueMember = "ID"; canChooseComboRestorer = true; }
public Exhibition(Exhibit tempExhibitWindow, ref DataSetMuseum tempDataset) { InitializeComponent(); dataset = tempDataset; ExW = tempExhibitWindow; exhibitionListBox.DataSource = dataset.Exhibition; exhibitionListBox.DisplayMember = "Name"; exhibitionListBox.ValueMember = "ID"; }
public Museum(Exhibit tempExhibitWindow, ref DataSetMuseum tempDataset, ref ControlFunction tempConrolFunction) { InitializeComponent(); ExW = tempExhibitWindow; ExW.Enabled = false; dataset = tempDataset; CFunc = tempConrolFunction; MuseumListBox.DataSource = dataset.Museum; MuseumListBox.DisplayMember = "Name"; MuseumListBox.ValueMember = "ID"; canChooseMuseum = true; }
public Restorer(Exhibit tempExhibitWindow, ref DataSetMuseum tempDataset, ref ControlFunction tempConrolFunction) { InitializeComponent(); dataset = tempDataset; ExW = tempExhibitWindow; CFunc = tempConrolFunction; RestorerListBox.DataSource = dataset.Restorer; RestorerListBox.DisplayMember = "Name"; RestorerListBox.ValueMember = "ID"; canChooseRestorer = true; }
public Showroom(Exhibit tempExhibitWindow, ref DataSetMuseum tempDataset, ref ControlFunction tempConrolFunction) { InitializeComponent(); dataset = tempDataset; ExW = tempExhibitWindow; CFunc = tempConrolFunction; showroomListBox.DataSource = dataset.Showroom; showroomListBox.DisplayMember = "Name"; showroomListBox.ValueMember = "ID"; canChooseShowroom = true; }
public ExhibitAdd(Exhibit tempExhibitWindow, ref DataSetMuseum tempDtaset, ref ControlFunction tempControlFunction) { InitializeComponent(); EW = tempExhibitWindow; dataset = tempDtaset; CFunc = tempControlFunction; comboBoxGetFrom.DisplayMember = "Name"; comboBoxGetFrom.ValueMember = "ID"; comboBoxExhibitCategor.DataSource = dataset.Category; comboBoxExhibitCategor.DisplayMember = "Name"; comboBoxExhibitCategor.ValueMember = "ID"; radioMuseum.Checked = false; radioMaecenas.Checked = false; }
public Rent(Exhibit tempExhibitWindow, ref DataSetMuseum tempDataset, ref ControlFunction tempConrolFunction) { InitializeComponent(); SetControlDefault(); dataset = tempDataset; ExW = tempExhibitWindow; CFunc = tempConrolFunction; museumComboBox.DataSource = dataset.Museum; museumComboBox.DisplayMember = "Name"; museumComboBox.ValueMember = "ID"; canChooseAnyMuseum = true; }
public string CheckTextBox(object window, string checkStr, string showSTR) { string newSTR = ""; //Для Exhibit { if (window.GetType() == typeof(Exhibit)) { ExW = (Exhibit)window; ExW.Enabled = false; if (checkStr.Trim() == "") { ShowMessage(showSTR); } ExW.Enabled = true; return(checkStr); } } //Для ExhibitAdd { if (window.GetType() == typeof(ExhibitAdd)) { ExAddW = (ExhibitAdd)window; ExAddW.Enabled = false; if (checkStr.Trim() == "") { ShowMessage(showSTR); } ExAddW.Enabled = true; return(checkStr); } } //Для Museum { if (window.GetType() == typeof(Museum)) { MusW = (Museum)window; MusW.Enabled = false; if (checkStr.Trim() == "") { ShowMessage(showSTR); } MusW.Enabled = true; return(checkStr); } } //Для Maecenas { if (window.GetType() == typeof(Maecenas)) { MaecW = (Maecenas)window; MaecW.Enabled = false; if (checkStr.Trim() == "") { ShowMessage(showSTR); } MaecW.Enabled = true; return(checkStr); } } //Для Showroom { if (window.GetType() == typeof(Showroom)) { ShowW = (Showroom)window; ShowW.Enabled = false; if (checkStr.Trim() == "") { ShowMessage(showSTR); } ShowW.Enabled = true; return(checkStr); } } //Для Restorer { if (window.GetType() == typeof(Restorer)) { RestorerW = (Restorer)window; RestorerW.Enabled = false; if (checkStr.Trim() == "") { ShowMessage(showSTR); } RestorerW.Enabled = true; return(checkStr); } } return(newSTR); }