protected void EBtnSubmit_Click(object sender, EventArgs e) { M_PayPlat info = new M_PayPlat(); if (Mid > 0) { info = bll.GetPayPlatByid(Mid); } info.PayClass = DataConverter.CLng(this.DDLPayPlat.SelectedValue);//支付ID info.PayPlatName = DDLPayName.Text; info.AccountID = TxtAccountID.Text; info.MD5Key = TxtMD5Key.Text; info.SellerEmail = TxtSellerEmail.Text; info.PayPlatinfo = txtRemark.Text; info.PublicKey = PublicKey_T.Text.Trim(); info.PrivateKey = PrivateKey_T.Text.Trim(); info.Other = Other_T.Text; info.IsDisabled = !IsDisabled.Checked; if (Mid > 0) { bll.Update(info); } else { info.IsDefault = false; info.IsDisabled = false; info.OrderID = bll.GetMaxOrder() + 1; info.UID = 0; bll.Add(info); } function.WriteSuccessMsg("操作成功", "PayPlatManage.aspx"); }
protected void Lnk_Click(object sender, GridViewCommandEventArgs e) { int pid = DataConverter.CLng(e.CommandArgument.ToString()); switch (e.CommandName) { case "SetDef": bll.SetDefault(pid); break; case "Disabled": M_PayPlat info = bll.GetPayPlatByid(pid); if (info.IsDisabled) { info.IsDisabled = false; } else { info.IsDisabled = true; } bll.Update(info); break; case "MovePre": bll.MovePre(pid); break; case "MoveNext": bll.MoveNext(pid); break; case "Delete": bll.DeleteByID(pid); Response.Redirect("PayPlatManage.aspx"); break; } MyBind(); }