private void button_CarManagement_Click(object sender, EventArgs e) { WaitingLabel.Show(); carManagement = new CarManagement(); this.Hide(); carManagement.Disposed += Form_Disposed; Application.DoEvents(); WaitingLabel.Hide(); }
private void button_AddActivity_Click(object sender, EventArgs e) { WaitingLabel.Show(); activityForm = new ActivityForm(); this.Hide(); activityForm.Disposed += Form_Disposed; Application.DoEvents(); WaitingLabel.Hide(); }
private void button2_Click(object sender, EventArgs e) { if (tIndex == -1) { return; } WaitingLabel.Show(); SQLHelper.DeleteData("Activities", "ID", tID); WaitingLabel.Hide(); SQLHelper.ReadActivities(dataGridView1); MessageBox.Show("删除成功!"); tIndex = -1; }
private void button1_Click(object sender, EventArgs e) { if (tIndex != -1) { WaitingLabel.Show(); if ((bool)dataGridView1["Enabled_CarManagement", tIndex].Value) { SQLHelper.UpdateData("Cars", "Enabled", "0", "ID", dataGridView1["ID_CarManagement", tIndex].Value.ToString()); } else { SQLHelper.UpdateData("Cars", "Enabled", "1", "ID", dataGridView1["ID_CarManagement", tIndex].Value.ToString()); } SQLHelper.ReadCars(dataGridView1); dataGridView1.Refresh(); MessageBox.Show("更改状态成功!"); WaitingLabel.Hide(); } }
private void RefreshForm() { timer.Enabled = false; WaitingLabel.Show(); Refresh(); switch (tabControl1.SelectedIndex) { case 0: SQLHelper.ReadOrders(dataGridView_CarHire); break; case 1: SQLHelper.ReadPlaneOrders(dataGridView_Flight); break; } WaitingLabel.Hide(); Refresh(); timer.Enabled = true; }
private void button1_Click(object sender, EventArgs e) { if (!CheckFull()) { MessageBox.Show("请确保所有基本信息均已录入!"); return; } else { WaitingLabel.Show(); SQLHelper.InsertData("Activities", textBox_Name.Text, "/Images/" + textBox_ImgPath.Text, textBox_BasicInfo.Text); FTPHelper.AddFile(textBox_ImgPath.Text, File.OpenRead(_imageFile)); ManageHelper.RefreshServer(); WaitingLabel.Hide(); MessageBox.Show("录入成功!"); } }
/// <summary> /// 分支窗口载入完毕后,主窗口消失 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void OtherForm_Load(object sender, EventArgs e) { WaitingLabel.Hide(); this.Hide(); }
private void button_RefreshServer_Click(object sender, EventArgs e) { WaitingLabel.Show(); ManageHelper.RefreshServer(); WaitingLabel.Hide(); }