Exemple #1
0
    protected void ObjectDataSource1_Selected(object sender, ObjectDataSourceStatusEventArgs e)
    {
        RmsOA.MODEL.GK_OA_AssetTransferModel manpowerneedModel = ((List<RmsOA.MODEL.GK_OA_AssetTransferModel>)e.ReturnValue)[0];
        this.ApplicationTitle = "固定资产转移";
        this.UnitCode = manpowerneedModel.PreDept;

    }
    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;
                }
            }
        }
    }