private void btnAdd_Click(object sender, EventArgs e) { Tripfrm frm = new Tripfrm(); frm.ShowDialog(); if (frm.DialogResult == System.Windows.Forms.DialogResult.OK) { listTrip = Chuyen.All(); btnAll.PerformClick(); } }
private void btnUpdate_Click(object sender, EventArgs e) { Tripfrm frm = new Tripfrm(); frm.MChuyen = MyConvert.ToInt32(lvTrips.SelectedItems[0].SubItems[0].Text); frm.ShowDialog(); if (frm.DialogResult == System.Windows.Forms.DialogResult.OK) { listTrip = Chuyen.All(); btnAll.PerformClick(); } }
private void Tripsfrm_Load(object sender, EventArgs e) { btnAdd.Visible = false; btnUpdate.Visible = false; btnDelete.Visible = false; if (Powers == PowersLog.Administrator || Powers == PowersLog.Saler) { btnAdd.Visible = true; btnUpdate.Visible = true; btnDelete.Visible = true; } dtpValue.EditValue = DateTime.Now; dtpValue.Visible = false; listTrip = Chuyen.All(); UpdateStatus(); listTrip = Chuyen.All(); btnAll.PerformClick(); cbbColumn_Load(); RadiosCheckState(); }