protected void imgbtnExport_Click(object sender, ImageClickEventArgs e) { try { //高级版以上用户才可以设置 if (SellersBLL.CheckSellerIsExit(Users.Nick)) { DataTable tb = null; if (rdoAllMember.Checked)//全部会员资料导出 { tb = BuyerBLL.GetExportBuyers(Users.Nick); } else { //部分会员资料导出 tb = BuyerBLL.GetExportBuyers(Users.Nick, datePicker.Value, datePickerEnd.Value, drpArea.SelectedValue, txtTradeAmountFrom.Text.Trim(), txtTradeAmountTo.Text.Trim()); } if (tb != null && tb.Rows.Count > 0) { DownloadToExcel(tb); } else { Page.ClientScript.RegisterStartupScript(Page.GetType(), "message", "<script type='text/javascript' defer=defer>alert('没有要下载的会员数据!');</script>"); } } else { versionControl.Visible = true; } } catch (Exception ex) { ExceptionReporter.WriteLog(ex, ExceptionPostion.TBApply_Web_UI); } }
protected void btnAdd_Click(object sender, EventArgs e) { string sellerNick = TextBox1.Text.Trim(); if (!SellersBLL.CheckSellerIsExit(sellerNick)) { if (SellersBLL.AddSellerExportAuth(sellerNick)) { Label1.Text = "添加成功!"; } else { Label1.Text = "添加失败!"; } } else { Label1.Text = "已经存在!"; } MsgDataBind(); }