Exemplo n.º 1
0
    protected void DocumentFileFormView_DataBound(object sender, EventArgs e)
    {
        HiddenField UserCodeHiddenField = (HiddenField)this.DocumentFileFormView.Row.FindControl("ApplyUserCodeHiddenField");
        Label       UserCodeLabel       = (Label)this.DocumentFileFormView.Row.FindControl("ApplyUserCodeLabel");

        switch (this.DocumentFileFormView.CurrentMode)
        {
        case FormViewMode.Edit:
            UserCodeLabel.Text = WebFunctionRule.GetUserNameByCode(UserCodeHiddenField.Value);
            Label       AppDepLabel       = (Label)this.DocumentFileFormView.Row.FindControl("ApplyDepartmentCodeLabel");
            HiddenField AppDepHiddenField = (HiddenField)this.DocumentFileFormView.Row.FindControl("ApplyDepartmentCodeHiddenField");
            AppDepLabel.Text = RmsPM.BLL.SystemRule.GetUnitName(AppDepHiddenField.Value);
            break;

        case FormViewMode.Insert:
            User u = (User)Session["User"];
            UserCodeHiddenField.Value = u.UserCode;
            UserCodeLabel.Text        = WebFunctionRule.GetUserNameByCode(u.UserCode);
            string SortCode      = "";
            string MarkingSNCode = "";
            if (!string.IsNullOrEmpty(FileTemplateCode))
            {
                FileTemplateModel template = FTBFL.GetFileTemplate(int.Parse(FileTemplateCode));
                if (template != null)
                {
                    SortCode = template.SortCode;
                    Web.SelectBox_SelectSessionUserUnit Unitddl = (Web.SelectBox_SelectSessionUserUnit) this.DocumentFileFormView.Row.FindControl("SelectSessionUserUnit");
                    MarkingSNCode = GetTempMarkingSN(Unitddl.SelectedValue, this.FileTemplateCode);
                }
            }
            Label SCLabel = (Label)this.DocumentFileFormView.Row.FindControl("SortCodeLabel");    //质量分类号

            SCLabel.Text = SortCode;
            TextBox DMSN = (TextBox)this.DocumentFileFormView.Row.FindControl("DoucmentMarkingSNLabel");    //标识序列号
            DMSN.Text = MarkingSNCode;
            break;
        }
    }
Exemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            //
            string ud_sProcedureCode = Request["ProcedureCode"] + "";
            string FileTemplateCode  = Request["FileTemplateCode"] + "";
            //this.EntityName = "WorkFlowCommon";
            this.WorkFlowName = RmsPM.BLL.WorkFlowRule.GetProcedureNameByCode(ud_sProcedureCode);
            this.OpinionCount = 1;
            FileTemplateBFL   FTBFL        = new FileTemplateBFL();
            DocumentFileBFL   DFBFL        = new DocumentFileBFL();
            FileTemplateModel fileTemplate = null;
            if (string.IsNullOrEmpty(FileTemplateCode))
            {
                fileTemplate = FTBFL.GetFileTemplateByProcCode(ud_sProcedureCode);
            }
            else
            {
                fileTemplate = FTBFL.GetFileTemplate(int.Parse(FileTemplateCode));
            }
            if (fileTemplate != null)
            {
                this.lblWorkFlowName.Text = fileTemplate.FileTemplateName;
                FileTemplateCode          = fileTemplate.Code.ToString();
            }

            if (!string.IsNullOrEmpty(Request["ApplicationCode"]))
            {
                this.lblWorkFlowName.Text = DFBFL.GetDocumentFile(int.Parse(Request["ApplicationCode"])).OperationType;
            }
            this.ucOperationControl.FileTemplateCode = fileTemplate.Code.ToString();


            this.OpinionPrefix = "WFC_";
            this.ucOperationControl.FileTemplateCode = FileTemplateCode;

            this.OpinionCount = 1;
            InitPage();
        }
    }