예제 #1
0
 public LoginGUI(MainGUI m)
 {
     InitializeComponent();
     this.m = m;
     this.a = m.A;
     checkLogin();
 }
예제 #2
0
 public LoginGUI(MainGUI m, MyCartForm mcf)
 {
     InitializeComponent();
     this.m   = m;
     this.mcf = mcf;
     checkMCF = true;
     checkLogin();
 }
예제 #3
0
        public MyCartForm(DataTable dt, Account a, MainGUI m, AlbumGUI agui)
        {
            InitializeComponent();

            this.m    = m;
            this.a    = a;
            this.agui = agui;
            this.dt   = dt;
            foreach (DataRow dr in dt.Rows)
            {
                numberOfCart += int.Parse(dr["amount"].ToString());
            }
            lbNumberCart.Text        = numberOfCart.ToString();
            dataGridView1.DataSource = dt;
            displayPanel(1);
        }
예제 #4
0
파일: AlbumGUI.cs 프로젝트: tvad0905/PRN292
        public AlbumGUI(MainGUI m)
        {
            this.m = m;
            this.a = m.A;
            dt_list.Columns.Add(new DataColumn("albumid", typeof(int)));
            dt_list.Columns.Add(new DataColumn("title", typeof(string)));
            dt_list.Columns.Add(new DataColumn("price", typeof(float)));
            dt_list.Columns.Add(new DataColumn("albumurl", typeof(string)));
            dt_list.Columns.Add(new DataColumn("amount", typeof(int)));

            InitializeComponent();
            //get Genres
            DataTable dt = GenreDAO.getAllGenres();
            DataRow   r  = dt.NewRow();

            r["genreid"] = -1;
            r["name"]    = "----- ALL -----";
            dt.Rows.Add(r);

            comboBox1.DataSource    = dt;
            comboBox1.DisplayMember = "name";
            comboBox1.ValueMember   = "genreid";

            comboBox1.SelectedIndex = dt.Rows.Count - 1;

            // get Arits

            DataTable dt1 = ArtistDAO.getAllArtist();
            DataRow   r1  = dt1.NewRow();

            r1["artistid"] = -1;
            r1["name"]     = "----- ALL -----";
            dt1.Rows.Add(r1);

            comboBox2.DataSource    = dt1;
            comboBox2.DisplayMember = "name";
            comboBox2.ValueMember   = "artistid";


            comboBox2.SelectedIndex = dt1.Rows.Count - 1;

            loadData();
        }