public List <GetMaterialsForSearchResult> GetSearchedMaterialsForListView(Int64?categoryID, Int64?pstedByID, string materialCode, DateTime?fromDate, DateTime?toDate)
 {
     try
     {
         OiiOHaatDCDataContext db = DatabaseHelper.GetDataModelDataContext();
         var materialList         = db.GetMaterialsForSearch(categoryID, pstedByID, materialCode, fromDate, toDate).ToList();
         return(materialList);
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message, ex);
     }
 }