/// <summary> /// 用前台参数替换报表 /// </summary> /// <param name="o"></param> /// <param name="Paramterslist"></param> /// <returns></returns> private static MD_ReportList NameDescReplace_Page(MD_ReportList o, string Paramterslist, bool isEn = true) { string[] ParamtersArray = Paramterslist.Split(','); int Pa = 0; if (ParamtersArray.Length <= 0) { return(null); } for (int i = 0; i < o.CT_Reports_List.Count; i++) { if (isNull(o.CT_Reports_List[i].PL_Tag)) { Pa++; continue; } if (i != 0 && o.CT_Reports_List[i].RP_Code == o.CT_Reports_List[i - 1].RP_Code) { o = oRowRemove(o, i); i = i - 1; } if (o.CT_Reports_List[i].PL_Type == 10) { string _v = BL_MyCar.getMake_Model_Style(1, int.Parse(ParamtersArray[Pa].ToString()), isEn); o = oReplace(o, i, _v); } else if (o.CT_Reports_List[i].PL_Type == 11) { string _v = BL_MyCar.getMake_Model_Style(2, int.Parse(ParamtersArray[Pa].ToString()), isEn); o = oReplace(o, i, _v); } else if (o.CT_Reports_List[i].PL_Type == 12) { string _v = BL_MyCar.getMake_Model_Style(3, int.Parse(ParamtersArray[Pa].ToString()), isEn); o = oReplace(o, i, _v); } else if (o.CT_Reports_List[i].PL_Type == 14) { string _v = new BL_Appt_Service().GetAdviserName(ParamtersArray[Pa].ToString()); o = oReplace(o, i, _v); } else if (o.CT_Reports_List[i].PL_Type == 20) { string _v = new BL_Appt_Service().Get_PeriodicalsText(ParamtersArray[Pa].ToString()); o = oReplace(o, i, _v); } else { o = oReplace(o, i); } Pa++; } return(o); }
/// <summary> /// 用后台参数替换报表 /// </summary> /// <param name="o"></param> /// <returns></returns> private static MD_ReportList NameDescReplace_Background(MD_ReportList o, bool isEn = true) { for (int i = 0; i < o.CT_Reports_List.Count; i++) { if (isNull(o.CT_Reports_List[i].PL_Tag)) { continue; } if (i != 0 && o.CT_Reports_List[i].RP_Code == o.CT_Reports_List[i - 1].RP_Code) { o = oRowRemove(o, i); i = i - 1; } if (o.CT_Reports_List[i].PL_Type == 10) { string _v = BL_MyCar.getMake_Model_Style(1, int.Parse(o.CT_Reports_List[i].PL_Default), isEn); o = oReplace(o, i, _v); } else if (o.CT_Reports_List[i].PL_Type == 11) { string _v = BL_MyCar.getMake_Model_Style(2, int.Parse(o.CT_Reports_List[i].PL_Default), isEn); o = oReplace(o, i, _v); } else if (o.CT_Reports_List[i].PL_Type == 12) { string _v = BL_MyCar.getMake_Model_Style(3, int.Parse(o.CT_Reports_List[i].PL_Default), isEn); o = oReplace(o, i, _v); } else if (o.CT_Reports_List[i].PL_Type == 14) { string _v = new BL_Appt_Service().GetAdviserName(o.CT_Reports_List[i].PL_Default); o = oReplace(o, i, _v); } else if (o.CT_Reports_List[i].PL_Type == 20) { string _v = new BL_Appt_Service().Get_PeriodicalsText(o.CT_Reports_List[i].PL_Default); o = oReplace(o, i, _v); } else { o = oReplace(o, i); } } return(o); }