public Form1() { InitializeComponent(); ShowNewItemsInDropdown(); lblAllTables.Text = TableStore.CountAllTables().ToString(); lblAllMenus.Text = MenuStore.CountAllMenus().ToString(); lblRezervimet.Text = ApointmentStore.AllApointment.Count.ToString(); ShowAllTablesInMainPanel(); }
private void btnAddTable_Click_1(object sender, EventArgs e) { if (txtAddTableCapacity.Text.Length >= 1 && txtAddTableNumber.Text.Length >= 1) { string status = rdAddTableActive.Checked ? "Active" : "Passive"; if (isValidNumber(txtAddTableNumber.Text) && isValidNumber(txtAddTableCapacity.Text)) { TableStore.CreateNewTable(new Table(int.Parse(txtAddTableNumber.Text), int.Parse(txtAddTableCapacity.Text), status)); MessageBox.Show("Tavolina u regjistrua me sukses"); txtAddTableCapacity.Clear(); txtAddTableNumber.Clear(); lblAllTables.Text = TableStore.CountAllTables().ToString(); } else { MessageBox.Show("Ju lutem shkruani fushtat ne formatin e duhur : Numer"); } } else { MessageBox.Show("ju lutem mbushni te gjitha fushat"); } }