Ejemplo n.º 1
0
        /// <summary>
        /// 右键删除按钮功能
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void toolMenuDelete_Click(object sender, EventArgs e)
        {
            AppInfo model = dgvInfos.Rows[dgvInfos.CurrentCell.RowIndex]
                            .DataBoundItem as AppInfo;

            if (MessageBox.Show(
                    "确定要删除 " + model.AppName + " 应用程序吗?",
                    "提示",
                    MessageBoxButtons.OKCancel,
                    MessageBoxIcon.Question) == DialogResult.Cancel)
            {
                return;
            }
            if (service.Delete(model))
            {
                InitData();
            }
        }
Ejemplo n.º 2
0
 public static bool Delete(string appID)
 {
     return(appInfoDal.Delete(appID));
 }