Click here to Skip to main content
15,900,258 members

Comments by Abdul Imran (Top 7 by date)

Abdul Imran 31-Jul-15 7:55am View    
var brand_qry = (from pd in SvarkWindow.prodlist
join pu in SvarkWindow.produnitslist on pd.Product_id equals pu.Product_id
where pu.position > 0
select pd.Product_name + " " + pd.Manufacturer).Distinct().ToList();


foreach (string item in brand_qry)
{
if (!string.IsNullOrEmpty(Search_txt1.Text))
{
if (item.StartsWith(typedString, StringComparison.CurrentCultureIgnoreCase))
{
autoList.Add(item);
}
}
}


And then i am filling the listBox

if (autoList.Count > 0)
{
lbSuggestion.ItemsSource = autoList;
lbSuggestion.Visibility = Visibility.Visible;
}
else if (Search_txt.Text.Equals(""))
{
lbSuggestion.Visibility = Visibility.Collapsed;
lbSuggestion.ItemsSource = null;
}
else
{
lbSuggestion.Visibility = Visibility.Collapsed;
lbSuggestion.ItemsSource = null;
}
}

But later i am unable to access the first field that is "pd.Product_name" and i am getting both field values .
so help me out of it.
Abdul Imran 31-Jul-15 7:53am View    
This is my code here:

var brand_qry = (from pd in SvarkWindow.prodlist
join pu in SvarkWindow.produnitslist on pd.Product_id equals pu.Product_id
where pu.position > 0
select pd.Product_name + " " + pd.Manufacturer).Distinct().ToList();


foreach (string item in brand_qry)
{
if (!string.IsNullOrEmpty(Search_txt1.Text))
{
if (item.StartsWith(typedString, StringComparison.CurrentCultureIgnoreCase))
{
autoList.Add(item);
}
}
}


And then i am filling the listBox

if (autoList.Count > 0)
{
lbSuggestion.ItemsSource = autoList;
lbSuggestion.Visibility = Visibility.Visible;
}
else if (Search_txt.Text.Equals(""))
{
lbSuggestion.Visibility = Visibility.Collapsed;
lbSuggestion.ItemsSource = null;
}
else
{
lbSuggestion.Visibility = Visibility.Collapsed;
lbSuggestion.ItemsSource = null;
}
}

But later i am unable to access the first field that is "pd.Product_name" and i am getting both field values .
so help me out of it.
Abdul Imran 31-Jul-15 5:00am View    
Yes i want
Abdul Imran 10-Jul-15 2:23am View    
Actually when i created service on that time it has taken all the tables and it added to the wcf service but now i have one more table which i want to add now but it is not adding in the wcf service.
Abdul Imran 30-Jun-15 7:13am View    
Yes its working fine Thank you Mr.Shekher god bless you .you saved my day.