Exemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            if (!String.IsNullOrEmpty(Request.QueryString["Type"]))
            {
                if (Request.QueryString["Type"].Equals("Add"))
                {
                    this.EvectionFormView.ChangeMode(FormViewMode.Insert);
                    return;
                }
            }

            if (EvectionFormView.CurrentMode == FormViewMode.ReadOnly)
            {
                //如果单据不是申请状态,则控制修改/删除/提交/作废等按钮
                RmsOA.BFL.GK_OA_EvectionApplyBFL     bfl   = new RmsOA.BFL.GK_OA_EvectionApplyBFL();
                RmsOA.MODEL.GK_OA_EvectionApplyModel model = new RmsOA.MODEL.GK_OA_EvectionApplyModel();
                model = bfl.GetGK_OA_EvectionApply(Convert.ToInt32(Request["Code"]));
                if (model.Status != "0")
                {
                    HtmlInputButton btnRequisition = ((HtmlInputButton)this.EvectionFormView.Row.FindControl("btnRequisition"));
                    btnRequisition.Visible = false;

                    this.EvectionFormView.Row.FindControl("EditButton").Visible   = false;
                    this.EvectionFormView.Row.FindControl("DeleteButton").Visible = false;
                    this.EvectionFormView.Row.FindControl("btnBankOut").Visible   = false;
                }
            }
        }
    }
Exemplo n.º 2
0
 protected void ObjectDataSource1_Selected(object sender, ObjectDataSourceStatusEventArgs e)
 {
     RmsOA.MODEL.GK_OA_EvectionApplyModel manpowerneedModel = ((List <RmsOA.MODEL.GK_OA_EvectionApplyModel>)e.ReturnValue)[0];
     this.ApplicationTitle = "员工出差申请";
     this.UnitCode         = manpowerneedModel.Dept;
 }