示例#1
0
 protected void grid_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "DeleteCertificate")
     {
         GiftCertificateService.DeleteCertificateById(Convert.ToInt32(e.CommandArgument));
     }
 }
示例#2
0
 protected void grid_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "DeleteCertificate")
     {
         GiftCertificateService.DeleteCertificateById(SQLDataHelper.GetInt(e.CommandArgument));
     }
     if (e.CommandName == "SendCertificate")
     {
         GiftCertificateService.SendCertificateMails(
             GiftCertificateService.GetCertificateByID(SQLDataHelper.GetInt(e.CommandArgument)));
     }
 }
示例#3
0
 protected void lbDeleteSelected_Click(object sender, EventArgs e)
 {
     if ((_selectionFilter != null) && (_selectionFilter.Values != null))
     {
         if (!_inverseSelection)
         {
             foreach (var id in _selectionFilter.Values)
             {
                 GiftCertificateService.DeleteCertificateById(Convert.ToInt32(id));
             }
         }
         else
         {
             var itemsIds = _paging.ItemsIds <int>("CertificateID as ID");
             foreach (var id in itemsIds.Where(certificateId => !_selectionFilter.Values.Contains(certificateId.ToString())))
             {
                 GiftCertificateService.DeleteCertificateById(id);
             }
         }
     }
 }