public static List <object> GetSubUserItems(string strPost_Dept, string strUserID) { List <object> listResult = new List <object>(); DataTable dt = new DataTable(); TSysUserVo objUser = new TSysUserVo(); objUser.IS_DEL = "0"; dt = new TSysUserLogic().SelectByTableUnderDept(strPost_Dept, 0, 0); DataTable dtItems = new DataTable(); dtItems = dt.Copy(); dtItems.Clear(); if (strUserID.Length > 0) { for (int i = 0; i < strUserID.Split(',').Length; i++) { DataRow[] dr = dt.Select("ID='" + strUserID.Split(',')[i] + "'"); if (dr != null) { foreach (DataRow Temrow in dr) { Temrow.Delete(); dt.AcceptChanges(); } } } } dtItems = dt.Copy(); listResult = LigerGridSelectDataToJson(dtItems, dtItems.Rows.Count); return(listResult); }
public static List <object> GetSelectUserItems(string strUserID) { List <object> listResult = new List <object>(); DataTable dt = new DataTable(); DataTable dtDuty = new DataTable(); dt = new TSysUserLogic().SelectByTableUnderDept("", 0, 0); DataTable dtItems = new DataTable(); dtItems = dt.Copy(); dtItems.Clear(); if (strUserID.Length > 0) { for (int i = 0; i < strUserID.Split(',').Length; i++) { DataRow[] dr = dt.Select("ID='" + strUserID.Split(',')[i] + "'"); if (dr != null) { foreach (DataRow Temrow in dr) { dtItems.ImportRow(Temrow); } } } } listResult = LigerGridSelectDataToJson(dtItems, dtItems.Rows.Count); return(listResult); }
public static List <object> GetSubUserItems(string strPost_Dept, string strItemID, string strDutyType) { DataTable dt = new TSysUserLogic().SelectByTableUnderDept(strPost_Dept, 0, 0); TSysDutyVo objItems = new TSysDutyVo(); objItems.MONITOR_ITEM_ID = strItemID; objItems.DICT_CODE = strDutyType; DataTable dtDuty = new TSysDutyLogic().SelectByUnionTableForWhere(objItems, 0, 0); DataTable dtItems = new DataTable(); dtItems = dt.Copy(); dtItems.Clear(); if (dtDuty.Rows.Count > 0) { for (int i = 0; i < dtDuty.Rows.Count; i++) { if (!String.IsNullOrEmpty(dtDuty.Rows[i]["ID"].ToString())) { DataRow[] dr = dt.Select("ID='" + dtDuty.Rows[i]["ID"].ToString() + "'"); if (dr != null) { foreach (DataRow Temrow in dr) { Temrow.Delete(); dt.AcceptChanges(); } } } } } dtItems = dt.Copy(); List <object> listResult = LigerGridSelectDataToJson(dtItems, dtItems.Rows.Count); return(listResult); }