private Boolean SaveData() { DateTime CCC_NgayCaps = DateTime.Now; DateTime CCC_NgayHetHan = DateTime.Now; if (sselection.SelectedCount > 0) { for (int i = 0; i < gridContentCertificate.RowCount; i++) { if (sselection.IsRowSelected(i)) { // Update coder DataRow dr = gridContentCertificate.GetDataRow(i); int HvId = int.Parse(dr["HvId"].ToString()); int LopId = int.Parse(dr["CCC_LOPID"].ToString()); object sNgayCap; object sNgayHetHan; sNgayCap = dateNgayCap.Text.Substring(3, 2) + "/" + dateNgayCap.Text.Substring(0, 2) + "/" + dateNgayCap.Text.Substring(6, 4); sNgayHetHan = dateNgayHetHan.Text.Substring(3, 2) + "/" + dateNgayHetHan.Text.Substring(0, 2) + "/" + dateNgayHetHan.Text.Substring(6, 4); CCC_NgayCaps = DateTime.Parse(String.Format("{0:yyyy/MM/dd}", sNgayCap.ToString())); CCC_NgayHetHan = DateTime.Parse(String.Format("{0:yyyy/MM/dd}", sNgayHetHan.ToString())); boCcc.CapLaiChungChi(HvId, LopId, CCC_NgayCaps, CCC_NgayHetHan, 3); } } } return(true); }