public void Recursion(DataTable dt, int PID, int LevelID) { DataRow[] dr = dt.Select("PID='" + PID + "'"); foreach (DataRow drr in dr) { drr["title"] = Comm.AddEmpty(drr["title"].ToString(), LevelID); int NewLevelID = LevelID + 1; Recursion(dt, Int32.Parse(drr["recid"].ToString()), NewLevelID); } }
private void Recursion(DataTable dt, int PID, int LevelID, ref DataTable outDT) { DataRow[] dr = dt.Select("PID='" + PID + "'", "OrderIndex"); foreach (DataRow drr in dr) { drr["title"] = Comm.AddEmpty(drr["bh"].ToString().Trim() + "|" + drr["title"].ToString().Trim(), LevelID); outDT.Rows.Add(drr.ItemArray); int NewLevelID = LevelID + 1; Recursion(dt, Int32.Parse(drr["recid"].ToString()), NewLevelID, ref outDT); } }
public void Recursion(DataTable dt, int PID, int LevelID, ref DataTable outDT) { DataRow[] dr = dt.Select("parentID='" + PID + "'", "OrderIndex"); foreach (DataRow drr in dr) { drr["ModuleName"] = Comm.AddEmpty(drr["ModuleName"].ToString(), LevelID); outDT.Rows.Add(drr.ItemArray); int NewLevelID = LevelID + 2; Recursion(dt, Int32.Parse(drr["moduleid"].ToString()), NewLevelID, ref outDT); } }
public void Recursion(DataTable dt, int PID, int LevelID, ref DataTable outDT) { DataRow[] dr = dt.Select("PID='" + PID + "'"); foreach (DataRow drr in dr) { drr["title"] = Comm.AddEmpty(drr["title"].ToString(), LevelID); outDT.Rows.Add(drr.ItemArray); int NewLevelID = LevelID + 1; Recursion(dt, Int32.Parse(drr["CellID"].ToString()), NewLevelID, ref outDT); } }
public void Recursion(DataTable dt, ref List <T_Module_MDL> list1, int PID, int LevelID) { DataRow[] dr = dt.Select("parentID='" + PID + "'", "OrderIndex"); foreach (DataRow drr in dr) { T_Module_MDL mdl1 = new T_Module_MDL(); mdl1.ModuleID = Common.ConvertEx.ToInt(drr["ModuleID"].ToString()); mdl1.ModuleName = Comm.AddEmpty(drr["ModuleName"].ToString(), LevelID); list1.Add(mdl1); int NewLevelID = LevelID + 1; Recursion(dt, ref list1, Int32.Parse(drr["moduleid"].ToString()), NewLevelID); } }
public void Recursion(DataTable dt, int PID, int LevelID) { DataRow[] dr = dt.Select("PID='" + PID + "'", "OrderIndex"); foreach (DataRow drr in dr) { T_FileListTmp_MDL mdl1 = new T_FileListTmp_MDL(); mdl1.recid = Common.ConvertEx.ToInt(drr["recid"].ToString()); mdl1.title = Comm.AddEmpty(drr["title"].ToString(), LevelID); arealist.Add(mdl1); int NewLevelID = LevelID + 1; Recursion(dt, Int32.Parse(drr["recid"].ToString()), NewLevelID); } }
public void Recursion(ref List <T_Area_MDL> list, string fathcode) { List <T_Area_MDL> areamdl = list.FindAll( delegate(T_Area_MDL p) { return(p.PID == Common.ConvertEx.ToInt(fathcode)); } ); foreach (T_Area_MDL objMDL in areamdl) { par_level++; T_Area_MDL mdl1 = new T_Area_MDL(); mdl1.AreaID = objMDL.AreaID; mdl1.area_code = objMDL.area_code; mdl1.area_name = Comm.AddEmpty(objMDL.area_name, par_level); area_list.Add(mdl1); Recursion(ref list, objMDL.AreaID.ToString()); par_level--; } }