Пример #1
0
 protected void btnSave_Click(object sender, EventArgs e)
 {
     FineOffice.Modules.OA_FlowRunData model = new FineOffice.Modules.OA_FlowRunData();
     model.Title        = txtTitle.Text.Trim();
     model.Remark       = txtRemark.Text.Trim();
     model.UpdateTime   = DateTime.Now;
     model.CreateTime   = DateTime.Now;
     model.RunProcessID = int.Parse(hiddenRunProcess.Text);
     if (ddlForm.SelectedValue.Length > 0)
     {
         FineOffice.Modules.OA_Form form = formBll.GetModel(m => m.ID == int.Parse(ddlForm.SelectedValue));
         model.FormData = form.FormData;
         model.FormID   = form.ID;
         model.XType    = form.XType;
     }
     try
     {
         model = runDataBll.Add(model);
         if (chkEdit.Checked)
         {
             string tabID = string.Format("{0:HHmmssffff}", DateTime.Now);
             PageContext.RegisterStartupScript("openTab('_FrmEditForm" + tabID +
                                               "','表单编辑-" + model.Title + "','WorkRun/FrmEditForm.aspx?ID=" + model.ID + "');");
         }
         PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference("refreshRunData"));
     }
     catch (Exception ex)
     {
         Alert.ShowInParent(ex.Message);
     }
 }
Пример #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         FineOffice.BLL.OA_Form bll = new FineOffice.BLL.OA_Form();
         model = bll.GetModel(i => i.ID == int.Parse(Request["ID"]));
     }
 }
Пример #3
0
    private void InitModule()
    {
        if (Request["ID"] == null)
        {
            return;
        }

        int id = int.Parse(Request["ID"].ToString());

        txtID.Text = id.ToString();
        FineOffice.Modules.OA_Form model = formBll.GetModel(d => d.ID == id);
        txtFormName.Text = model.FormName;
        txtFormNO.Text   = model.FormNO;
        if (model.TypeID != null)
        {
            ddlType.SelectedValue = model.TypeID.Value.ToString();
        }
        txtPinyinCode.Text = model.PinyinCode;
        chkStop.Checked    = model.Stop.Value;
        txtRemark.Text     = model.Remark;
    }
Пример #4
0
 protected void btnSave_Click(object sender, EventArgs e)
 {
     FineOffice.Modules.OA_Form model = formBll.GetModel(d => d.ID == int.Parse(txtID.Text));
     model.FormNO     = txtFormNO.Text.Trim();
     model.FormName   = txtFormName.Text.Trim();
     model.PinyinCode = txtPinyinCode.Text.Trim();
     if (ddlType.SelectedValue.Length > 0)
     {
         model.TypeID = int.Parse(ddlType.SelectedValue);
     }
     model.Remark = txtRemark.Text.Trim();
     model.Stop   = chkStop.Checked;
     try
     {
         formBll.Update(model);
         PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference("subwin_close"));
     }
     catch (Exception ex)
     {
         Alert.Show(ex.Message);
     }
 }