Exemple #1
0
 public ListaPlac(_SQLConnection _conn, decimal idListy, string nazwa, int okres, string numer)
 {
     this._conn   = _conn;
     this.IdListy = idListy;
     this.Nazwa   = nazwa;
     this.Okres   = okres;
     this.Numer   = numer;
 }
Exemple #2
0
        public wyborSkladnikow(Form1 form1)
        {
            InitializeComponent();
            this.form1           = form1;
            this._conn           = form1._conn;
            this.listaSkladnikow = form1.listaSkladnikow;

            this.listView1Reset();
            this.pobierzListeSkladnikow();
            this.wczytajWybraneZPliku();
            this.wypelnijListeSkladnikow();
        }
Exemple #3
0
        public static SortedDictionary <decimal, Firma> pobierzFirmy(_SQLConnection _conn)
        {
            SortedDictionary <decimal, Firma> result = new SortedDictionary <decimal, Firma>();

            try
            {
                string    query = "SELECT ID_FIRMY, NAZWA from FIRMA";
                DataTable dt    = _conn.ExecSql(query);

                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    DataRow dr         = dt.Rows[i];
                    decimal idFirmy    = dr.Field <decimal>("ID_FIRMY");
                    string  nazwaFirmy = dr.Field <string>("NAZWA");
                    result[idFirmy] = new Firma(_conn, idFirmy, nazwaFirmy);
                }
                return(result);
            }
            catch (Exception ex)
            {
                MessageBox.Show("Problem z pobraniem danych firm. | " + ex.Message);
                return(result);
            }
        }
Exemple #4
0
 public Firma(_SQLConnection _conn, decimal idFirmy, string nazwa)
 {
     this._conn   = _conn;
     this.idFirmy = idFirmy;
     this.nazwa   = nazwa;
 }
Exemple #5
0
 public Pracownik(_SQLConnection _conn, decimal idPracownika)
 {
     this._conn        = _conn;
     this.idPracownika = idPracownika;
 }