Exemplo n.º 1
0
 private void BtnDeleteClick(object vipInfo)
 {
     this.Invoke(new Action(() =>
     {
         VIPInfo v = new VIPInfo();
         v         = vipInfo as VIPInfo;
         if (vipBLL.VipDelete(v))
         {
             MessageBox.Show("删除成功!");
             LogInfo logInfo = new LogInfo();
             logInfo.UserId  = StaticData.userLocal.UserId;
             logInfo.Content = "删除了会员‘" + (vipInfo as VIPInfo).VipName + "'";
             logInfo.LogTime = DateTime.Now;
             logInfo.DpId    = StaticData.departLocal.DpId;
             bool b          = new LogBLL().LogInsert(logInfo);
             if (IsNameSelect)
             {
                 btnOK.Enabled        = false;
                 progressBar1.Visible = true;
                 backgroundWorker2.RunWorkerAsync();
             }
             else
             {
                 btnOK.Enabled        = false;
                 progressBar1.Visible = true;
                 backgroundWorker1.RunWorkerAsync();
             }
         }
         else
         {
             MessageBox.Show("删除失败!");
         }
     }));
 }