public static LocaleStringResourceCollection Search(SearchFilter SearchKey) { LocaleStringResourceCollection collection = new LocaleStringResourceCollection(); using (var reader = SqlHelper.ExecuteReader("DNHLocaleStringResource_Search", SearchFilterManager.SqlSearchParam(SearchKey))) { while (reader.Read()) { LocaleStringResource obj = new LocaleStringResource(); obj = GetItemFromReader(reader); collection.Add(obj); } } return(collection); }
public virtual DataTable ImportData(DataTable objList) { IEnumerable <LocaleStringResource> myList = objList.ToList <LocaleStringResource>(); LocaleStringResourceCollection ErrorList = new LocaleStringResourceCollection(); foreach (LocaleStringResource objitem in myList) { try { Save(objitem); } catch (Exception objEx) { objitem.ErrorMesssage = "<div class='error'>" + objEx.Message + "</div>"; ErrorList.Add(objitem); } } return(ErrorList.ToDataTable <LocaleStringResource>()); }
public static LocaleStringResourceCollection GetbyUser(string CreatedUser, int CompanyID) { LocaleStringResourceCollection collection = new LocaleStringResourceCollection(); LocaleStringResource obj; var sqlParams = new SqlParameter[] { new SqlParameter("@CreatedUser", CreatedUser), new SqlParameter("@CompanyID", CompanyID), }; using (var reader = SqlHelper.ExecuteReader("LocaleStringResource_GetAll_byUser", sqlParams)) { while (reader.Read()) { obj = GetItemFromReader(reader); collection.Add(obj); } } return(collection); }