Ejemplo n.º 1
0
    /// <summary>
    /// 实现业务数据保存
    /// </summary>
    /// <returns></returns>
    public override string SubmitData()
    {
        if (this.DocumentFileFormView.CurrentMode == FormViewMode.Insert)
        {
            Web.SelectBox_SelectSessionUserUnit Unitddl = (Web.SelectBox_SelectSessionUserUnit) this.DocumentFileFormView.Row.FindControl("SelectSessionUserUnit");
            this.UnitCode = Unitddl.SelectedValue;
            this.DocumentFileFormView.InsertItem(true);

            TextBox txtSubject = (TextBox)this.DocumentFileFormView.Row.FindControl("SubjectTextBox");
            this.ApplicationTitle = txtSubject.Text;
        }
        else
        {
            if (this.DocumentFileFormView.CurrentMode == FormViewMode.Edit)
            {
                HiddenField UnitHF = (HiddenField)this.DocumentFileFormView.Row.FindControl("ApplyDepartmentCodeHiddenField");
                this.UnitCode = UnitHF.Value;
                this.DocumentFileFormView.UpdateItem(false);

                TextBox txtSubject = (TextBox)this.DocumentFileFormView.Row.FindControl("SubjectTextBox");
                this.ApplicationTitle = txtSubject.Text;
            }
        }
        return("");
    }
Ejemplo n.º 2
0
 protected void DocumentFileFormView_ItemInserting(object sender, FormViewInsertEventArgs e)
 {
     //this.FileTemplateCode = Request["FileTemplateCode"];
     Web.SelectBox_SelectSessionUserUnit Unitddl = (Web.SelectBox_SelectSessionUserUnit) this.DocumentFileFormView.Row.FindControl("SelectSessionUserUnit");
     e.Values["ApplyDepartmentCode"] = Unitddl.SelectedValue;
     e.Values["OperationType"]       = FTBFL.GetFileTemplate(int.Parse(this.FileTemplateCode)).FileTemplateName;
     e.Values["FileTemplateCode"]    = int.Parse(this.FileTemplateCode);
     FTVQM.FileTemplateCodeEqual     = int.Parse(this.FileTemplateCode);
     FTVQM.IsAvailabilityEqual       = "有效";
     e.Values["VersionNumber"]       = FTVBFL.GetFileTemplateVersionList(FTVQM)[0].VersionNumber;
     e.Values["ArchiveState"]        = "未归档";
     e.Values["CreateDate"]          = DateTime.Now;
     e.Values["CreateUserCode"]      = ((User)Session["User"]).UserCode;
     this.ApplicationTitle           = e.Values["Subject"].ToString();
 }
Ejemplo n.º 3
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;
        }
    }