public static void DeleteForm(string form_kind, int form_no, string user_id) { FormHeader formheader = FormHeaderBiz.GetFormHeader(form_kind, form_no); FormList formlist = FormListBiz.GetFormList(form_kind); SysSiteList sitelist = SysSiteListBiz.GetSiteList(formheader.SiteSerial); SimpleFlow.WebFramework.FlowerService.DeleteForm(formlist.FlowerFormKind, formheader.FlowerFormNo, user_id, sitelist.FlowerEngineservice); }
public static string GetFormFooterHTML(string form_kind, int form_no, string WidthType, string Width, string LogonRegion, bool IsAttachCss, bool IsShowApproveList) { FormHeader formheader = FormHeaderBiz.GetFormHeader(form_kind, form_no); FormList formlist = FormListBiz.GetFormList(form_kind); SysSiteList sitelist = SysSiteListBiz.GetSiteList(formheader.SiteSerial); return(SimpleFlow.WebFramework.FlowerService.GetFormFooterHTML(formlist.FlowerFormKind, formheader.FlowerFormNo, WidthType, Width, LogonRegion, IsAttachCss, IsShowApproveList, sitelist.FlowerFlowerapi)); }
public static string ApplyForm(string form_kind, int form_no, string form_package) { FormHeader formheader = FormHeaderBiz.GetFormHeader(form_kind, form_no); FormList formlist = FormListBiz.GetFormList(form_kind); SysSiteList sitelist = SysSiteListBiz.GetSiteList(formheader.SiteSerial); return(SimpleFlow.WebFramework.FlowerService.ApplyForm(formlist.FlowerFormKind, form_package, sitelist.FlowerFormcradle)); }
public static void RecallForm(string form_kind, int form_no, string user_id, string reason) { FormHeader formheader = FormHeaderBiz.GetFormHeader(form_kind, form_no); FormList formlist = FormListBiz.GetFormList(form_kind); SysSiteList sitelist = SysSiteListBiz.GetSiteList(formheader.SiteSerial); SimpleFlow.WebFramework.FlowerService.RecallForm(formlist.FlowerFormKind, formheader.FlowerFormNo, user_id, reason, sitelist.FlowerFlowerapi); }
public virtual void Visit(FormHeader formHeader, HtmlContainer htmlContainer) { if (formHeader.Icon == FormIcon.NotSet) { return; } HtmlItalic htmlItalic = new HtmlItalic(); htmlItalic.Class.AddRange(IconClass(formHeader.Icon)); htmlContainer.Insert(0, htmlItalic); }
public static bool ApplyForm(int formId, int formNo, string applyerId) { FormHeader formHeader = new FormHeader(formId, formNo); formHeader.Applyer = applyerId; ParseParticipantBiz p = new ParseParticipantBiz(formId, formNo); FormApproveList formApproveList = p.Parse(); DbConnection conn = ConnectionDataAccess.CreateConnection(); conn.Open(); try { DbTransaction trans = conn.BeginTransaction(); try { formHeader.Insert(trans); formApproveList.Insert(trans); trans.Commit(); return(true); } catch (Exception ex) { trans.Rollback(); SimpleFlow.SystemFramework.Log.WriteLog("Engine_ApplyForm", ex); return(false); } } finally { conn.Close(); } }
public virtual void Visit(FormHeader formHeader, HtmlContainer htmlContainer) { HtmlDiv htmlDiv = verbose ? new HtmlDiv(formHeader.Path) : new HtmlDiv(); htmlDiv.Class.Add("formHeader"); if (!string.IsNullOrWhiteSpace(formHeader.CssClass)) { htmlDiv.Class.AddRange(formHeader.CssClass.Split(' ').Where(s => s != string.Empty)); } htmlDiv.Class.AddRange(new string[] { "card-header", "mb-3" }); if (!string.IsNullOrWhiteSpace(formHeader.Path)) { htmlDiv.Class.Add(string.Format("{0}{1}", "formId", formHeader.Path)); } htmlDiv.Hidden.Value = formHeader.IsHidden; htmlContainer.Add(htmlDiv); htmlDiv.Add(new HtmlText(formHeader.Content)); }
//--creation--// public Form(string name) : base(name) { //pre-load form stuff! this.header = FormHeader.GenerateNewHeader(); this.AddElementInternal(this.header); }
public static bool ApproveForm(int formId, int formNo, String formApproveId, String approverId, String approveValue, String approveContent) { FormApproveList fal = new FormApproveList(formId, formNo); FormHeader formHeader = new FormHeader(formId, formNo); FormApprove CurrentFA = fal.Find(delegate(FormApprove fa) { return(fa.FormApproveId == formApproveId); }); DbConnection conn = ConnectionDataAccess.CreateConnection(); conn.Open(); try { DbTransaction trans = conn.BeginTransaction(); try { CurrentFA.AppStatus = ApproveStatus.STATUS_APPROVED; CurrentFA.AppActor = approverId; CurrentFA.AppContent = approveContent; CurrentFA.AppValue = approveValue; CurrentFA.EndDate = DateTime.Now; CurrentFA.Update(trans); if (approveValue == ApproveStatus.APP_VALUE_NO) //否决 { formHeader.FormStatus = FormStatus.RJ; formHeader.EndDate = DateTime.Now; formHeader.Update(trans); } else //同意 { int currentSerial = CurrentFA.AppSerial; int nextSerial = currentSerial + 1; for (int i = 0; i < fal.Count; i++) { if (fal[i].AppSerial == currentSerial && fal[i].AppStatus == ApproveStatus.STATUS_UNDER_APPROVE) { break; } else if (fal[i].AppSerial == nextSerial) { fal[i].AppStatus = ApproveStatus.STATUS_UNDER_APPROVE; fal[i].Update(trans); } else if (fal[i].AppSerial > nextSerial) { break; } } //签核完成 if (fal.Count == fal.FindAll(delegate(FormApprove fa) { return(fa.AppStatus == ApproveStatus.STATUS_APPROVED); }).Count) { formHeader.FormStatus = FormStatus.AP; formHeader.EndDate = DateTime.Now; formHeader.Update(trans); } } trans.Commit(); return(true); } catch (Exception ex) { trans.Rollback(); SimpleFlow.SystemFramework.Log.WriteLog("Engine_ApproveForm", ex); return(false); } } finally { conn.Close(); } }