Need to define variable count i=count
Becose I need to auto create number of buttons from counter
- SqlCommand cmd = new SqlCommand();
- cmd.CommandText = "SELECT COUNT(*) FROM roba_usluge";
- Int32 count = (Int32)cmd.ExecuteScalar();
- int top = 50;
- int left = 50;
- for (int i = 0; i = count.ToString(); i++)
- {
- Button button = new Button();
- button.Left = left;
- button.Top = top;
- button.Text = (i + 1).ToString();
- this.Controls.Add(button);
- top += button.Height + 2;
- }
Amit GuptaPosted Apr 5, 2018, 3:22 PM
Goran BibicPosted Apr 5, 2018, 4:12 PM
Amit GuptaPosted Apr 5, 2018, 4:03 PM
Amit GuptaPosted Apr 5, 2018, 3:45 PM
Goran BibicPosted Apr 5, 2018, 3:35 PM
Goran BibicPosted Apr 5, 2018, 3:08 PM
Amit GuptaPosted Apr 5, 2018, 3:04 PM
Goran BibicPosted Apr 5, 2018, 3:00 PM
Amit GuptaPosted Apr 5, 2018, 2:56 PM