protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (!String.IsNullOrEmpty(Request.QueryString["Type"]))
            {
                if (Request.QueryString["Type"].Equals("Add"))
                {
                    this.FormView1.ChangeMode(FormViewMode.Insert);
                }
            }
            if (FormView1.CurrentMode == FormViewMode.ReadOnly)
            {
                //如果单据不是申请状态,则控制修改/删除/提交/作废等按钮
                RmsOA.BFL.GK_OA_AssetTransferBFL     bfl   = new RmsOA.BFL.GK_OA_AssetTransferBFL();
                RmsOA.MODEL.GK_OA_AssetTransferModel model = new RmsOA.MODEL.GK_OA_AssetTransferModel();
                model = bfl.GetGK_OA_AssetTransfer(Convert.ToInt32(Request["Code"]));
                if (model.Status != "0")
                {
                    HtmlInputButton btnRequisition = ((HtmlInputButton)this.FormView1.Row.FindControl("btnRequisition"));
                    btnRequisition.Visible = false;

                    this.FormView1.Row.FindControl("EditButton").Visible   = false;
                    this.FormView1.Row.FindControl("DeleteButton").Visible = false;
                    this.FormView1.Row.FindControl("btnBankOut").Visible   = false;
                }
            }
        }
    }
 protected void btnBankOut_Click(object sender, EventArgs e)
 {
     try
     {
         RmsOA.BFL.GK_OA_AssetTransferBFL bfl = new RmsOA.BFL.GK_OA_AssetTransferBFL();
         bfl.ModifyBankOutAuditing(int.Parse(this.FormView1.DataKey.Value.ToString()));
     }
     catch (Exception ex)
     {
         ApplicationLog.WriteLog(this.ToString(), ex, "");
         Response.Write(Rms.Web.JavaScript.Alert(true, "作废出错:" + ex.Message));
         throw ex;
     }
 }