//保存 protected void Save_Btn_Click(object sender, EventArgs e) { OAFormUI.vstate = ViewState; Call commonCall = new Call(); M_OA_Document oaMod = null; if (Mid > 0) { oaMod = oaBll.SelReturnModel(Mid); } oaMod = FillMod(oaMod); M_MisProcedure proceMod = proceBll.SelReturnModel(ProID); DataTable table = OAFormUI.CreateTable(OAFormUI.GetFields(OAFormUI.ModelID).Split(',')); if (Mid > 0)//修改 { M_CommonData conMod = conBll.SelReturnModel(Convert.ToInt32(oaMod.Content)); conBll.UpdateContent(table, conMod); oaBll.UpdateByID(oaMod); } else { oaMod.Content = commonCall.AddContentToNode(oaMod, NodeID, OAFormUI.ModelID, table).ToString(); oaMod.ID = oaBll.insert(oaMod); } oaCom.CreateStep(oaMod, proceMod, new OAStepParam() { IsFirst = true, ReferUser = ReferUser_Hid.Value, StepNum = 1 }); Response.Redirect("ViewDrafting.aspx?ID=" + oaMod.ID + "&FlowType=2"); }
//protected void Type_SelectedIndexChanged(object sender, EventArgs e) //{ // int modelID = DataConvert.CLng(Type.SelectedValue.ToString()); // if (modelID > 0) // { // mmis = bmis.SelReturnModel(modelID); // Content.Text = mmis.ModelContent; // } // else // { // Content.Text = ""; // } //} //protected void proDP_SelectedIndexChanged(object sender, EventArgs e) //{ // if (proDP.SelectedIndex == 0) return; // int proID = DataConvert.CLng(proDP.SelectedValue); // proMod = proBll.SelReturnModel(proID); // if (proMod.AllowAttach == 1) // { // upFileTR.Visible = true; // } //} //保存 #endregion protected void saveBtn_Click(object sender, EventArgs e) { int proID = DataConverter.CLng(proDP.SelectedValue); int id = 0; if (Request.QueryString["Edit"] == "1" && Request.QueryString["appID"] != "") { moa = boa.SelReturnModel(DataConvert.CLng(Request.QueryString["appID"])); id = moa.ID; FillMod(0, moa); boa.UpdateByID(moa); } else { moa = FillMod(0); id = boa.insert(moa); } CreateStep(id); Response.Redirect("ViewDrafting.aspx?ID=" + id); }
//protected void Type_SelectedIndexChanged(object sender, EventArgs e) //{ // int modelID = DataConvert.CLng(Type.SelectedValue.ToString()); // if (modelID > 0) // { // mmis = bmis.SelReturnModel(modelID); // Content.Text = mmis.ModelContent; // } // else // { // Content.Text = ""; // } //} //protected void proDP_SelectedIndexChanged(object sender, EventArgs e) //{ // if (proDP.SelectedIndex == 0) return; // int proID = DataConvert.CLng(proDP.SelectedValue); // proMod = proBll.SelReturnModel(proID); // if (proMod.AllowAttach == 1) // { // upFileTR.Visible = true; // } //} //保存 #endregion protected void saveBtn_Click(object sender, EventArgs e) { int proID = DataConverter.CLng(proDP.SelectedValue); if (Request.QueryString["Edit"] == "1" && Request.QueryString["appID"] != "") { moa = boa.SelReturnModel(DataConvert.CLng(Request.QueryString["appID"])); FillMod(0, moa); boa.UpdateByID(moa); } else { moa = FillMod(0); moa.ID = boa.insert(moa); } M_MisProcedure proceMod = proBll.SelReturnModel(moa.ProID); oaCom.CreateStep(moa, proceMod, new OAStepParam() { IsFirst = true, ReferUser = RUserID_Hid.Value, StepNum = 1 }); { //同步入能力中心 M_User_Plat upMod = B_User_Plat.GetLogin(); if (upMod != null) { B_Blog_Msg msgBll = new B_Blog_Msg(); M_Blog_Msg msgMod = new M_Blog_Msg(); msgMod.CompID = upMod.CompID; msgMod.CUser = upMod.UserID; msgMod.CUName = upMod.TrueName; msgMod.MsgContent = "[" + upMod.TrueName + "]发布了一条公文,标题:<a href=\"/Office/Office/ReadOffice.aspx?AppID=" + moa.ID + "\" target=\"_blank\">" + moa.Title + "</a>"; msgMod.GroupIDS = ""; msgBll.Insert(msgMod); } } Response.Redirect("ViewDrafting.aspx?ID=" + moa.ID); }