public static List <UserAccounts> GetUserAccountsByUserID(string userid, string clientid) { if (string.IsNullOrEmpty(userid) || string.IsNullOrEmpty(clientid)) { return(null); } DataTable dt = new OrganizationDAL().GetUserAccountsByUserID(userid, clientid); List <UserAccounts> list = new List <UserAccounts>(); UserAccounts model; foreach (DataRow item in dt.Rows) { model = new UserAccounts(); model.FillData(item); list.Add(model); } return(list); }