protected void SubmitEvents(object sender, EventArgs e) { try { if (IsPreview == false) { string strActionName = ((Button)sender).Text.Trim(); base.SubAction = strActionName; if (strActionName == ProcessConstString.SubmitAction.ACTION_SAVE_DRAFT) //保存 { EntityLetterSend entity = ControlToEntity(true) as EntityLetterSend; entity.SubmitAction = strActionName; base.FormSubmit(true, strActionName, null, entity as EntityBase); } else { EntityLetterSend entity = ControlToEntity(false) as EntityLetterSend; entity.SubmitAction = strActionName; if (CheckData(entity) == false) { return; } if (strActionName == ProcessConstString.SubmitAction.ACTION_CANCEL) { base.FormCancel(entity as EntityBase); } else { if (base.StepName == ProcessConstString.StepName.LetterSend.函件分发) { if (base.SubAction == "完成") { //新增文号 LetterNum lnum = new LetterNum(); lnum.UpdateNo(txtOurRef.Text, txtCompanyID.Text, drpHanJian.SelectedValue); entity.ReceiveUserID = entity.ReceiveUserID; } } Hashtable ht = EntityLetterSend.GetProcNameValue(base.StepName, strActionName, entity);//ap属性 base.FormSubmit(false, strActionName, ht, entity as EntityBase); if (base.StepName == ProcessConstString.StepName.LetterSend.函件分发) { if (base.SubAction == "完成") { base.Circulate(entity.ccDeptIDs, "1", "", GetCYNames(entity), "2", false, "", true); } } } } } else { string strActionName = ((Button)sender).Text.Trim(); base.SubAction = strActionName; EntityLetterSend entity = ControlToEntity(false) as EntityLetterSend; if (strActionName == "追加分发") { base.Circulate(entity.ccDeptIDs, "1", "", GetCYNames(entity), "2", false, "", true); } else if (strActionName == "二次分发") { base.WorkItemID = Guid.NewGuid().ToString("N"); base.StepName = "二次分发"; base.SaveNewEntity(strActionName, entity); base.Circulate(entity.ccDeptIDs, "1", "", GetCYNames(entity), "4", true, "", true); } } } catch (Exception ex) { //JScript.ShowMsgBox(Page, MsgType.VbCritical, ex.Message); JScript.Alert(ex.Message, false); return; } }