Click here to Skip to main content
15,892,537 members

Comments by Manamohan Jha (Top 46 by date)

Manamohan Jha 21-Jul-16 4:56am View    
Above link not useful for me, bcoz i ma not using this line

public DbSet<addressdetail> AddressDetails { get; set; }

my class directly execute on OnModelCreating().
And i want to do all task through repository pattern...
Manamohan Jha 17-Mar-16 5:37am View    
In which event they proper work??
Manamohan Jha 11-Mar-16 4:50am View    
How to solve this error
Manamohan Jha 11-Mar-16 4:50am View    
Now getting New error :-
Exception has been thrown by the target of an invocation
Manamohan Jha 11-Mar-16 3:08am View    
Problem in condition on DoWord Event...

condition is :- CmbSrch(layoutControl5.Controls, "cmbhp").Length > 0

Code Is:-
public string CmbSrch(Control.ControlCollection cc, string txt)
{
string str = "";
int z = 1;
foreach (Control ctrl in cc)
{
string _cmb = txt + z.ToString();
ComboBox cmb = ctrl as ComboBox;

if (cmb != null && cmb.Name == _cmb)
{
if (cmb.Text.Trim() != "")
{
if (cmb.Name == "cmbhp1")
{
if (cmb.Text == "Low")
str += string.Format("txt{0} < '0.8' AND ", z.ToString());
if (cmb.Text == "High")
str += string.Format("txt{0} > '7.6' AND ", z.ToString());
if (cmb.Text == "Normal")
str += string.Format("txt{0} >= '0.8' AND txt{0} <= '7.6' AND ", z.ToString());
}
else
str += string.Format("txt{0}='" + cmb.Text + "' AND ", z.ToString());

}
z++;
}
}
if (str != "")
return str = str.Substring(0, str.Length - 4);
else
return "";
}


Thsi code accessing from outside of DOWork

Error is:-
Cross thread operation not valid : control 'cmbhp1' accessed from a thread other than the thread it was created on