protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { if (!String.IsNullOrEmpty(Request.QueryString["Type"])) { if (Request.QueryString["Type"].Equals("Add")) { this.AccountFormView.ChangeMode(FormViewMode.Insert); return; } } } if (AccountFormView.CurrentMode == FormViewMode.ReadOnly) { //如果单据不是申请状态,则控制修改/删除/提交/作废等按钮 RmsOA.BFL.GK_OA_CapitalAssertAcountBFL bfl = new RmsOA.BFL.GK_OA_CapitalAssertAcountBFL(); RmsOA.MODEL.GK_OA_CapitalAssertAcountModel model = new RmsOA.MODEL.GK_OA_CapitalAssertAcountModel(); model = bfl.GetGK_OA_CapitalAssertAcount(Convert.ToInt32(Request["Code"])); if (model.Status != "0") { HtmlInputButton btnRequisition = ((HtmlInputButton)this.AccountFormView.Row.FindControl("btnRequisition")); btnRequisition.Visible = false; this.AccountFormView.Row.FindControl("EditButton").Visible = false; this.AccountFormView.Row.FindControl("DeleteButton").Visible = false; this.AccountFormView.Row.FindControl("btnBankOut").Visible = false; } } }
protected void btnBankOut_Click(object sender, EventArgs e) { try { RmsOA.BFL.GK_OA_CapitalAssertAcountBFL bfl = new RmsOA.BFL.GK_OA_CapitalAssertAcountBFL(); bfl.ModifyBankOutAuditing(int.Parse(this.AccountFormView.DataKey.Value.ToString())); } catch (Exception ex) { ApplicationLog.WriteLog(this.ToString(), ex, ""); Response.Write(Rms.Web.JavaScript.Alert(true, "作废出错:" + ex.Message)); throw ex; } }