Пример #1
0
        void Fill_checked_capacity()
        {
            int a, b, result_a = 0, result_b = 0, f = 0, count = 0;

            foreach (DataGridViewRow dr in Rooms_dgv.Rows)
            {
                bool chckselected = Convert.ToBoolean(dr.Cells["CheckboxColumn"].Value);
                if (chckselected)
                {
                    f         = 1;
                    count    += 1;
                    a         = int.Parse(dr.Cells["A_Series"].Value.ToString());
                    b         = int.Parse(dr.Cells["B_Series"].Value.ToString());
                    result_a += a;
                    result_b += b;
                    TotalRoom_textbox.Text     = count.ToString();
                    TotalCapacity_textbox.Text = ("A - " + result_a + "  B - " + result_b);
                    RoomNo_textbox.ResetText();
                    Priority_combobox.SelectedIndex = 0;
                    A_series_textbox.ResetText();
                    B_series_textbox.ResetText();
                }
                if (f == 0)
                {
                    FillCapacity();
                }
            }
        }
Пример #2
0
 void Cleardata()
 {
     RoomNo_textbox.ResetText();
     Priority_combobox.SelectedIndex = 0;
     A_series_textbox.ResetText();
     B_series_textbox.ResetText();
     RoomsdgvFill();
     FillCapacity();
 }
Пример #3
0
 void Cleardata()
 {
     RoomNo_textbox.ResetText();
     Priority_combobox.SelectedIndex = 0;
     A_series_textbox.ResetText();
     B_series_textbox.ResetText();
     this.roomsTableAdapter.Fill(this.exam_Cell_Rooms.Rooms);
     FillCapacity();
 }