コード例 #1
0
        public ServiceUC()
        {
            InitializeComponent();
            context = new FrizerskiContext();
            unit    = new UnitOfWork(context);
            var usluga = this.unit.Uslugaa.GetAllUsluga();

            var klijent = this.unit.Klijentt.GetAllKlijent();

            comboBox1.Items.Clear();
            comboBox3.Items.Clear();
            foreach (var k in klijent)
            {
                comboBox1.Items.Add(k.ime.ToString());
                comboBox3.Items.Add(k.oblikovanjeKose.ToString());
            }

            var zaposleni = this.unit.Zaposlenii.GetAllZaposleni();

            comboBox4.Items.Clear();
            foreach (var z in zaposleni)
            {
                if (z.tipZaposlenog == "F")
                {
                    comboBox4.Items.Add(z.ime.ToString());
                }
            }
        }
コード例 #2
0
ファイル: Addingstaff.cs プロジェクト: Aminadd/Hair_salon
        public Addingstaff()
        {
            InitializeComponent();
            context = new FrizerskiContext();
            unit    = new UnitOfWork(context);
            var zaposleni = this.unit.Zaposlenii.GetAllZaposleni();

            dataGridView1.DataSource = (from a in zaposleni
                                        select new
            {
                ID = a.IDZaposleni,
                Name = a.ime,
                Surname = a.prezime,
                Mobile_number = a.brTelefona,
                JMBG = a.JMBG,
                Username = a.korisnickoIme,
                Password = a.sifra,
                Type_of_employee = a.tipZaposlenog
            }).ToList();
        }
コード例 #3
0
        public receivingClientsUC()
        {
            InitializeComponent();
            context = new FrizerskiContext();
            unit    = new UnitOfWork(context);
            var klijenti = this.unit.Klijentt.GetAllKlijent();

            dataGridView1.DataSource = (from a in klijenti
                                        select new
            {
                ID = a.IDKlijent,
                Name = a.ime,
                Surname = a.prezime,
                JMBG = a.JMBG,
                Mobile_number = a.brTel,
                Hair_type = a.tipKose,
                Hair_length = a.duzinaKose,
                Hair_washing_preparations = a.preparatiZaPranje,
                Hair_styling_preparations = a.oblikovanjeKose
            }).ToList();
        }
コード例 #4
0
        public SchedulingAppointmentUC()
        {
            InitializeComponent();
            context = new FrizerskiContext();
            unit    = new UnitOfWork(context);
            var termin  = this.unit.Terminn.GetAllTermin();
            var klijent = this.unit.Klijentt.GetAllKlijent();
            var usluga  = this.unit.Uslugaa.GetAllUsluga();

            dataGridView1.DataSource = (from a in termin
                                        join b in klijent on a.KlijentID equals b.IDKlijent
                                        join c in usluga on a.UslugaID equals c.IDUsluga
                                        where a.KlijentID == b.IDKlijent
                                        where a.UslugaID == c.IDUsluga
                                        select new
            {
                Time = a.vreme,
                Name = a.imeiprezime,
                IDClient = b.IDKlijent,
                IDService = c.IDUsluga
            }).ToList();


            var klijentt = this.unit.Klijentt.GetAllKlijent();

            comboBox2.Items.Clear();
            foreach (var k in klijent)
            {
                comboBox2.Items.Add(k.ime.ToString());
                comboBox3.Items.Add(k.IDKlijent.ToString());
            }
            var uslugaa = this.unit.Uslugaa.GetAllUsluga();

            foreach (var u in usluga)
            {
                comboBox4.Items.Add(u.IDUsluga.ToString());
            }
        }
コード例 #5
0
 public Form1()
 {
     InitializeComponent();
     context = new FrizerskiContext();
     unit    = new UnitOfWork(context);
 }
コード例 #6
0
 public TerminRepository(FrizerskiContext context)
 {
     this.context = context;
 }
コード例 #7
0
 public UslugaRepository(FrizerskiContext context)
 {
     this.context = context;
 }
コード例 #8
0
 public ZaposleniRepository(FrizerskiContext context)
 {
     this.context = context;
 }
コード例 #9
0
 public KlijentRepository(FrizerskiContext context)
 {
     this.context = context;
 }