private void btnSave_Click(object sender, EventArgs e) { if (grvCN.RowCount == 0) { return; } grvCN.FocusedRowHandle = -1; for (int i = 0; i < grvCN.RowCount; i++) { int id = TextUtils.ToInt(grvCN.GetRowCellValue(i, colID)); SolutionFileTypeModel cN = new SolutionFileTypeModel(); if (id > 0) { cN = (SolutionFileTypeModel)SolutionFileTypeBO.Instance.FindByPK(id); } cN.TypeName = TextUtils.ToString(grvCN.GetRowCellValue(i, colName)); //cN.Description = TextUtils.ToString(grvCN.GetRowCellValue(i, colDes)); if (cN.TypeName == "") { continue; } if (id > 0) { SolutionFileTypeBO.Instance.Update(cN); } else { SolutionFileTypeBO.Instance.Insert(cN); } } loadGroupFile(); MessageBox.Show("Lưu trữ thành công!", TextUtils.Caption, MessageBoxButtons.OK, MessageBoxIcon.Information); }
protected SolutionFileTypeFacade(SolutionFileTypeModel model) : base(model) { }