Click here to Skip to main content
15,946,179 members

Comments by hamid-shrk (Top 16 by date)

hamid-shrk 3-Nov-16 13:44pm View    
Thank you my dear friend, it works greatly :)
hamid-shrk 3-Nov-16 13:15pm View    
Deleted
I put it:
public IQueryable<simcardoutput> GetSimCardBySearch(string number)
{
var context = new Entities();
var simcard = context.SimCards;
var operators = context.Operators;
var rondtype = context.RondTypes;
var city = context.Cities;
Regex rr = new Regex(number.Replace("*", @"\d"));
var query = from s in simcard
join o in operators on s.IdOperatorFK equals o.IdOperator
join r in rondtype on s.IdRondTypeFK equals r.IdRondType
join c in city on s.IdCityFK equals c.IdCity
where
rr.Match(s.Number).Success
select new SimCardOutPut()
{
IdSimCard = s.IdSimCard,
Operator = o.Title,
RondType = r.Title,
City = c.Title,
Number = s.Number,
Type = s.Type,
Status = s.Status,
Quality = s.Quality,
Seller = s.Seller,
Price = (Int64)s.Price,
ShowType = s.ShowType,
Active = (Boolean)s.Active
};
return query;
}
and the result was:
LINQ to Entities does not recognize the method 'System.Text.RegularExpressions.Match Match(System.String)' method, and this method cannot be translated into a store expression.
hamid-shrk 8-Mar-13 8:42am View    
oh i forgot this,
very very thank you.
hamid-shrk 8-Mar-13 6:09am View    
why when id don't use update panel validation controls doesn't work correctly?
hamid-shrk 8-Mar-13 6:02am View    
i think you don't understand my problem,
dear Reje, when i use validation controls, they doesn't work and page refresh.