コード例 #1
0
ファイル: ucMjesta.cs プロジェクト: sindab/Kadrovska-sluzba
        public ucMjesta()
        {
            InitializeComponent();

            if (!(LicenseManager.UsageMode == LicenseUsageMode.Designtime))
            {
                OpstinaService os = new OpstinaService();
                lkpOpstine.DataSource = os.GetAll();
                ms = new MjestoService();
                LoadData();
            }
        }
コード例 #2
0
        public frmMjestoEdit(int Id)
        {
            InitializeComponent();

            if (!(LicenseManager.UsageMode == LicenseUsageMode.Designtime))
            {
                OpstinaService os = new OpstinaService();
                lkpOpstine.Properties.DataSource = os.GetAll();
                mjestoID = Id;
                ms       = new MjestoService();
                LoadData(Id);
            }
        }
コード例 #3
0
        //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();
            }
        }
コード例 #4
0
        public IEnumerable <Opstina> GetDataSource()
        {
            IEnumerable <Opstina> result = os.GetAll();

            return(result);
        }