public ucRadnoMjesto() { InitializeComponent(); if (!(LicenseManager.UsageMode == LicenseUsageMode.Designtime)) { rms = new RadnoMjestoService(); LoadData(); } }
public frmRadnoMjestoEdit(int Id) { InitializeComponent(); if (!(LicenseManager.UsageMode == LicenseUsageMode.Designtime)) { radnoMjestoID = Id; rms = new RadnoMjestoService(); LoadData(Id); } }
//private string PathName //{ // get // { // //using (RegistryKey registryKey = Registry.CurrentUser.OpenSubKey(@"Software\Kadrovska")) // //{ // return (string)registryKey.GetValue("frmRadnikLayout"); // //} // } //} private void ucRadnici_Load(object sender, EventArgs e) { if (!this.DesignMode) { if (System.IO.File.Exists(openFileDialog1.FileName)) { gridView.RestoreLayoutFromXml(openFileDialog1.FileName); } LoadData(0); //gridView1.RestoreLayoutFromRegistry("frmRadnikLayout"); MjestoService ms = new MjestoService(); IEnumerable <Mjesto> mj = ms.GetAll(); lkpMjestoRodjenja.DataSource = mj.ToList(); lkpMjestoStan.DataSource = mj.ToList(); DrzavljanstvoService ds = new DrzavljanstvoService(); lkpDrzavljanstvoID.DataSource = ds.GetAll().ToList(); NacinPrestankaROService nps = new NacinPrestankaROService(); lkpNacinPrestankaRoID.DataSource = nps.GetAll().ToList(); NacionalnostService ns = new NacionalnostService(); lkpNacionalnostID.DataSource = ns.GetAll().ToList(); OpstinaService os = new OpstinaService(); lkpOpstinaIzdavanjaRK.DataSource = os.GetAll().ToList(); PorodicnoStanjeService pss = new PorodicnoStanjeService(); lkpPorodicnoStanjeID.DataSource = pss.GetAll().ToList(); PoslovnaJedinicaService pjs = new PoslovnaJedinicaService(); lkpPoslovnaJedinicaID.DataSource = pjs.GetAll().ToList(); RadnoMjestoService rms = new RadnoMjestoService(); lkpRadnoMjestoID.DataSource = rms.GetAll().ToList(); StrucnaSpremaService sss = new StrucnaSpremaService(); lkpStrucnaSpremaID.DataSource = sss.GetAll().ToList(); TipRadnogOdnosaService trs = new TipRadnogOdnosaService(); lkpTipRadnogOdnosaID.DataSource = trs.GetAll().ToList(); } }
/// <summary> /// Initializes a new instance of the <see cref="RadnoMjestoController"/> class. /// </summary> /// <param name="context">The context.</param> /// <param name="repository">The repository.</param> public RadnoMjestoController() { this.apotekaContext = new ApotekaContext(); this.radnoMjestoService = new RadnoMjestoService(apotekaContext); this.vmService = new RadnoMjestoVMService(apotekaContext); }