Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
204 views
in Technique[技术] by (71.8m points)

c# - Trying to filter queries in dictionary does not work only when i run with visual studio

So i have a function which tries to add a specific price to an existing product . My problem is the dictionary works just fine if i run my code from visual studio, but if i copy the debug folder from my project and i run the .exe comand from it the dictionary does not work and i end up having duplicate promotions for a product

Dictionary<string, string> filter= new Dictionary<string, string>();
                  filter.Clear();
                    filter.Add("id_product", prod.id.ToString());
                    filter.Add("price", String.Format("{0:0.000000}", prod.price));
                   filter.Add("from", startDate);
                  filter.Add("to", endDate);


                    var result = specificPriceFactory.GetByFilter(filter, null, null);
                    specific_price specificPrice = null;

                    if (result.Count == 0)
                    {

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...