Click here to Skip to main content
15,892,517 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["MVEdb"].ConnectionString);
SqlDataAdapter da = new SqlDataAdapter("select * from MVE_FinalRX where RxType='Final CL Rx'", con);
SqlDataAdapter da1 = new SqlDataAdapter("select * from MVE_FinalRX where RxType='Final Spectacle Rx'", con);
SqlDataAdapter da2 = new SqlDataAdapter("select RxType from MVE_FinalRX where RxType='Final CL Rx'", con);
DataSet ds = new DataSet();
da.Fill(ds, "MVE_FinalRX");
da1.Fill(ds, "MVE_FinalRX");
da2.Fill(ds, "MVE_FinalRX");

// Here I have to compare based on Rxtype if Rxtype is Final CL Rx execute if condition or else
if () 
{
    //Final CL Rx values
}
else
{
    //Final Spectacle Rx value
}
Posted
Updated 6-Nov-15 5:17am
v2
Comments
OriginalGriff 6-Nov-15 7:03am    
And?
What have you tried?
Where are you stuck?
What help do you need?
aarif moh shaikh 6-Nov-15 7:25am    
Why you storing all output in a single Ds Table ?
George Jonsson 6-Nov-15 11:19am    
Not clear what it is you want to do.
ZurdoDev 6-Nov-15 12:03pm    
look at ds.Tables[0][columnName]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900