Ejemplo n.º 1
0
        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);
            }
        }
Ejemplo n.º 2
0
        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);
            }
        }