private void btnSave_Click(object sender, EventArgs e) { QCScoreType_DataEntity socretypeentity = SetEntity(); if (socretypeentity == null) { return; } string edittype = ""; //表示为新增 if (m_ScoreType == null) { edittype = "0"; } else { edittype = "1"; socretypeentity.Typecode = m_ScoreType.Typecode; } SqlManger m_sqlmanger = new SqlManger(m_app); m_sqlmanger.EditQCTypeScore(edittype, socretypeentity); m_app.CustomMessageBox.MessageShow("保存成功!"); ISRefresh = true; this.Close(); }
private void btnDel_Click(object sender, EventArgs e) { if (gridViewScoreType.FocusedRowHandle < 0) { return; } DataRow foucesRow = gridViewScoreType.GetDataRow(gridViewScoreType.FocusedRowHandle); if (foucesRow == null) { return; } if (foucesRow.IsNull("TYPECODE")) { return; } m_sqlManger.EditQCTypeScore("2", FillQCTypeValue2Entity(foucesRow)); m_app.CustomMessageBox.MessageShow("删除成功!"); BindDataSource(); }