public string GetAnnex(string wfmId, string noteid) { WFInstanceMainService wFInstanceMainService = new WFInstanceMainService(); WFInstanceMain byId = wFInstanceMainService.GetById(Convert.ToInt32(wfmId)); string text = ConfigurationManager.AppSettings["Audit"].ToString(); string result; try { string[] files = Directory.GetFiles(string.Concat(new object[] { base.Server.MapPath(text), "\\", byId.InstanceCode, "\\", noteid })); StringBuilder stringBuilder = new StringBuilder(); string[] array = files; for (int i = 0; i < array.Length; i++) { string text2 = array[i]; string text3 = string.Empty; text3 = text2.Substring(text2.LastIndexOf("\\") + 1); string str = string.Concat(new object[] { text, "/", byId.InstanceCode, "/", noteid }); string str2 = str + "/" + text3; text3 = string.Concat(new string[] { "<a class=\"link\" target=_blank href=\"../../Common/DownLoad.aspx?path=", HttpUtility.UrlEncode(str2), "\" >", text3, "</a>" }); stringBuilder.Append(text3); stringBuilder.Append(" <br/ >"); } string text4 = string.Empty; if (stringBuilder.Length > 6) { text4 = stringBuilder.ToString().Substring(0, stringBuilder.Length - 6); } result = text4; } catch { result = ""; } return(result); }
public string GetOriginatorDate() { WFInstanceMainService wFInstanceMainService = new WFInstanceMainService(); WFInstanceMain wFInstanceMain = wFInstanceMainService.GetByInstanceCode(this.pcId).FirstOrDefault <WFInstanceMain>(); if (wFInstanceMain != null) { return(wFInstanceMain.StartTime.Value.ToString("yyyy-MM-dd")); } return(string.Empty); }
public PTyhmc GetOrginator() { WFInstanceMainService wFInstanceMainService = new WFInstanceMainService(); PTYhmcService pTYhmcService = new PTYhmcService(); WFInstanceMain wFInstanceMain = wFInstanceMainService.GetByInstanceCode(this.pcId).FirstOrDefault <WFInstanceMain>(); if (wFInstanceMain != null) { return(pTYhmcService.GetById(wFInstanceMain.Organiger)); } return(null); }
public static void DeleteInvalid() { try { WFInstanceMainService source = new WFInstanceMainService(); WFBusinessCodeService service2 = new WFBusinessCodeService(); List <WFInstanceMain> list = source.ToList <WFInstanceMain>(); for (int i = list.Count - 1; i > 0; i--) { WFInstanceMain item = list[i]; WFBusinessCode byId = service2.GetById(item.BusinessCode); string sql = string.Concat(new object[] { "SELECT * FROM ", byId.LinkTable, " WHERE ", byId.KeyWord, "='", item.InstanceCode, "'" }); if (source.ExcuteSql(sql).Count == 0) { source.Delete(item); } } } catch { } }