Example #1
0
 public void copy(identity IDobject)
 {
     _ID   = new Guid(IDobject._ID.ToString());
     _type = IDobject.type;
 }
Example #2
0
        private void btEnt_Click(object sender, EventArgs e)
        {
            ListNull();
            ListDB();
            BlockNewEnt();
            BlockSearch();
            unBlockZapr();
            cbNewEnt.Text = "И";
            switch (cbSearch.Text)
            {
            case "Фильм": { EntitiesForFilm(); NowEnt = eEntity.Фильм; break; }

            case "Кинотеатр": { EntitiesForCinema(); NowEnt = eEntity.Кинотеатр; break; }

            case "Зал": { EntitiesForHall(); NowEnt = eEntity.Зал; break; }

            case "Сеанс": { EntitiesForSession(); NowEnt = eEntity.Сеанс; break; }

            case "Кассир": { EntitiesForCashier(); NowEnt = eEntity.Кассир; break; }

            case "Билет": { EntitiesForTicket(); NowEnt = eEntity.Билет; break; }

            case "Бронь": { EntitiesForBoking(); NowEnt = eEntity.Бронь; break; }

            default: { break; }
            }
            if (user == eUser.Админ)
            {
                AdminSearch();
            }
            dgvList.MultiSelect = true;
            switch (NowEnt)
            {
            case eEntity.Фильм:
            {
                UpdateFilms();
                if (user != eUser.Админ)
                {
                    FilmSearch();
                }
                break;
            }

            case eEntity.Сеанс:
            {
                UpdateSession();
                if (user != eUser.Админ)
                {
                    SessionSearch();
                }
                break;
            }

            case eEntity.Кинотеатр:
            {
                UpdateCinema();
                dgvList.MultiSelect = false;
                break;
            }

            case eEntity.Зал:
            {
                UpdateHall();
                dgvList.MultiSelect = false;
                break;
            }

            case eEntity.Кассир:
            {
                UpdateCashier();
                break;
            }

            case eEntity.Билет:
            {
                UpdateTicket();
                break;
            }

            case eEntity.Бронь:
            {
                UpdateBooking();
                break;
            }

            default: { break; }
            }
            Information();
        }
Example #3
0
 public identity(eEntity type, string ID)
 {
     _ID   = new Guid(ID);
     _type = type;
 }
Example #4
0
 public void setType(eEntity type)
 {
     _type = type;
 }
Example #5
0
 public identity(eEntity type)
 {
     _ID   = Guid.NewGuid();
     _type = type;
 }
Example #6
0
 public void setType(eEntity type)
 {
     _type = type;
 }
Example #7
0
 public void copy(identity IDobject)
 {
     _ID = new Guid(IDobject._ID.ToString());
     _type = IDobject.type;
 }
Example #8
0
 public identity(eEntity type, string ID)
 {
     _ID = new Guid(ID);
     _type = type;
 }
Example #9
0
 public identity(eEntity type)
 {
     _ID = Guid.NewGuid();
       _type = type;
 }