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