Пример #1
0
 protected void ObjectDataSource1_Selected(object sender, ObjectDataSourceStatusEventArgs e)
 {
     RmsOA.MODEL.GK_OA_ArchivesCopyModel manpowerneedModel = ((List <RmsOA.MODEL.GK_OA_ArchivesCopyModel>)e.ReturnValue)[0];
     this.ApplicationTitle = manpowerneedModel.FileName + "-档案借用复印审批";
     this.UnitCode         = manpowerneedModel.UnitCode;
 }
Пример #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Request["Code"] + "" == "")
            {
                FormView1.ChangeMode(FormViewMode.Insert);
            }

            if (FormView1.CurrentMode == FormViewMode.ReadOnly)
            {
                if (user.HasRight("320402"))
                {
                    this.FormView1.Row.FindControl("EditButton").Visible = true;
                }
                else
                {
                    this.FormView1.Row.FindControl("EditButton").Visible = false;
                }
                if (user.HasRight("320403"))
                {
                    this.FormView1.Row.FindControl("DeleteButton").Visible = true;
                }
                else
                {
                    this.FormView1.Row.FindControl("DeleteButton").Visible = false;
                }

                if (user.HasRight("320404"))
                {
                    this.FormView1.Row.FindControl("btnRequisition").Visible = true;
                }
                else
                {
                    this.FormView1.Row.FindControl("btnRequisition").Visible = false;
                }

                if (user.HasRight("320405"))
                {
                    this.FormView1.Row.FindControl("btnBankOut").Visible = true;
                }
                else
                {
                    this.FormView1.Row.FindControl("btnBankOut").Visible = false;
                }
                WorkFlowControl_WorkFlowList work = (WorkFlowControl_WorkFlowList)this.FormView1.Row.FindControl("WorkFlowList1");
                work.ProcedureNameAndApplicationCodeList = "'档案复印/借用审批" + this.FormView1.DataKey.Value.ToString() + "'";
                work.DataBound();

                //如果单据不是申请状态,则控制修改/删除/提交/作废等按钮

                RmsOA.BFL.GK_OA_ArchivesCopyBFL     bfl   = new RmsOA.BFL.GK_OA_ArchivesCopyBFL();
                RmsOA.MODEL.GK_OA_ArchivesCopyModel model = new RmsOA.MODEL.GK_OA_ArchivesCopyModel();
                model = bfl.GetGK_OA_ArchivesCopy(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;
                }
            }
        }
    }