Ejemplo n.º 1
0
        private void Del(Guid userId)
        {
            HandlingResult result = ValidateBeforeSave();

            result = _action.Delete(userId);
            if (result.Successed)
            {
                MessageHelper.ShowErrorNotify(this, result.Message);
            }
            else
            {
                MessageHelper.ShowErrorNotify(this, result.Message);
            }
        }
Ejemplo n.º 2
0
 private void dataGridViewList_MouseDoubleClick(object sender, MouseEventArgs e)
 {
     //TODO del
     try
     {
         DataRowView  drv    = (DataRowView)dataGridViewList.CurrentRow.DataBoundItem;
         DataRow      dr     = drv.Row;
         DialogResult result = MessageBox.Show(String.Format("确认删除[{0}]?", dr["LoginName"]), "提示", MessageBoxButtons.YesNo);
         if (result == DialogResult.Yes)
         {
             _action = new UserAction();
             _action.Delete(Guid.Parse(dr["ID"].ToString()));
         }
     }
     catch (Exception ex)
     {
         _log.Error(ex);
     }
 }