private void ToolStripButton_DeleteTemplate_Click(object sender, EventArgs e) { StockTemplate template = GetSelectTemplate(); if (template == null) { return; } //archive before deleting ArchiveTemplate(template); //delete int ret = _templateBLL.DeleteTemplate(template); if (ret == 1) { _tempDataSource.Remove(template); tempGridView.Invalidate(); MessageDialog.Info(this, msgDeleteTempSuccess); } else { MessageDialog.Warn(this, msgDeleteTemp); } }
private void ToolStripButton_DeleteTemplate_Click(object sender, EventArgs e) { StockTemplate template = GetSelectTemplate(); if (template == null) { return; } int ret = _templateBLL.DeleteTemplate(template); if (ret == 1) { MessageDialog.Info(this, msgDeleteTempSuccess); } else { MessageDialog.Warn(this, msgDeleteTemp); } }