private void btnThemMoi_Click(object sender, EventArgs e) { HanMuc_Session.themhoacsua = 1; //1 tức là đang thêm frmThemHoacSuaHanMuc hm = new frmThemHoacSuaHanMuc(); hm.ShowDialog(); string thoigian = dtpThoiGianXem.Text; LoadData(thoigian); }
private void btnSua_Click(object sender, EventArgs e) { HanMuc_Session.themhoacsua = 0; //0 tức là đang sửa int mahm = Convert.ToInt32(gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "id").ToString()); HanMuc_Session.mahm = mahm; frmThemHoacSuaHanMuc hm = new frmThemHoacSuaHanMuc(); hm.ShowDialog(); string thoigian = dtpThoiGianXem.Text; LoadData(thoigian); }