Click here to Skip to main content
15,900,378 members
Home / Discussions / C#
   

C#

 
GeneralRe: Readout datagrid in PowerPoint 2010 and insert datas in new PowerPoint slide Pin
Member 1177560018-Jun-15 6:50
Member 1177560018-Jun-15 6:50 
GeneralRe: Readout datagrid in PowerPoint 2010 and insert datas in new PowerPoint slide Pin
Dave Kreskowiak18-Jun-15 9:22
mveDave Kreskowiak18-Jun-15 9:22 
GeneralRe: Readout datagrid in PowerPoint 2010 and insert datas in new PowerPoint slide Pin
Member 1177535418-Jun-15 9:54
Member 1177535418-Jun-15 9:54 
GeneralRe: Readout datagrid in PowerPoint 2010 and insert datas in new PowerPoint slide Pin
Dave Kreskowiak18-Jun-15 10:03
mveDave Kreskowiak18-Jun-15 10:03 
GeneralRe: Readout datagrid in PowerPoint 2010 and insert datas in new PowerPoint slide Pin
Member 1177535418-Jun-15 10:09
Member 1177535418-Jun-15 10:09 
GeneralRe: Readout datagrid in PowerPoint 2010 and insert datas in new PowerPoint slide Pin
Dave Kreskowiak18-Jun-15 10:15
mveDave Kreskowiak18-Jun-15 10:15 
GeneralRe: Readout datagrid in PowerPoint 2010 and insert datas in new PowerPoint slide Pin
Member 1177535418-Jun-15 10:19
Member 1177535418-Jun-15 10:19 
Questionc#(Invalid attempt to call HasRows when reader is closed)occurred when i was using the following query in 3tier Pin
Member 1129409418-Jun-15 1:19
Member 1129409418-Jun-15 1:19 

dataaccesslayer


public SqlDataReader reader(string query)
{
try
{
con1.Open();
cmd = new SqlCommand(query, con1);
dr = cmd.ExecuteReader(System.Data.CommandBehavior.CloseConnection);
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
finally
{
con1.Close();
}
return dr;
}

logical layer


public SqlDataReader Product_Gridclick(string id)
{
query = "select pid,pname,pmodel,pprice,sprice,discount,pdescription from product_table where pid=" + "'" + id + "'";
return da.reader(query);
}

presentation layer

  string s = dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString();
        SqlDataReader dr;
        dr = llayer.Product_Gridclick(s);
        if (dr.HasRows)
        {
            while (dr.Read())
            {
                txtproductid.ReadOnly = false;
                txtproductid.Text = dr[0].ToString();
                txtproname.Text = dr[1].ToString();
                txtpromodel.Text = dr[2].ToString();
                txtpurprice.Text = dr[3].ToString();
                txtsaleprice.Text = dr[4].ToString();
                txtdiscount.Text = dr[5].ToString();
                rchdescription.Text = dr[6].ToString();
            }
        }

Gnanavel Sekar
AnswerRe: c#(Invalid attempt to call HasRows when reader is closed)occurred when i was using the following query in 3tier Pin
Pete O'Hanlon18-Jun-15 1:26
mvePete O'Hanlon18-Jun-15 1:26 
SuggestionRe: c#(Invalid attempt to call HasRows when reader is closed)occurred when i was using the following query in 3tier Pin
Sascha Lefèvre18-Jun-15 1:46
professionalSascha Lefèvre18-Jun-15 1:46 
AnswerRe: c#(Invalid attempt to call HasRows when reader is closed)occurred when i was using the following query in 3tier Pin
OriginalGriff18-Jun-15 2:21
mveOriginalGriff18-Jun-15 2:21 
Questiondatavisualization - Audiometric chart Pin
Member 1061400017-Jun-15 21:52
Member 1061400017-Jun-15 21:52 
QuestionC# crystal report to generate bill/invoice Pin
shashimk8117-Jun-15 21:13
shashimk8117-Jun-15 21:13 
AnswerRe: C# crystal report to generate bill/invoice Pin
joost.versteegen22-Jun-15 1:28
joost.versteegen22-Jun-15 1:28 
QuestionHow do I access checkbox checked value in a email body built using C#? Pin
Rajesh_198017-Jun-15 10:53
Rajesh_198017-Jun-15 10:53 
AnswerRe: How do I access checkbox checked value in a email body built using C#? Pin
rajeshkasani0517-Jun-15 23:41
rajeshkasani0517-Jun-15 23:41 
GeneralRe: How do I access checkbox checked value in a email body built using C#? Pin
Rajesh_198018-Jun-15 4:40
Rajesh_198018-Jun-15 4:40 
GeneralRe: How do I access checkbox checked value in a email body built using C#? Pin
rajeshkasani0521-Jun-15 23:05
rajeshkasani0521-Jun-15 23:05 
GeneralRe: How do I access checkbox checked value in a email body built using C#? Pin
Rajesh_198022-Jun-15 10:41
Rajesh_198022-Jun-15 10:41 
QuestionGeneric problem of VB.NET Pin
econy17-Jun-15 9:12
econy17-Jun-15 9:12 
AnswerRe: Generic problem of VB.NET Pin
Pete O'Hanlon17-Jun-15 9:19
mvePete O'Hanlon17-Jun-15 9:19 
GeneralRe: Generic problem of VB.NET Pin
econy17-Jun-15 9:31
econy17-Jun-15 9:31 
GeneralRe: Generic problem of VB.NET Pin
econy17-Jun-15 9:37
econy17-Jun-15 9:37 
AnswerRe: Generic problem of VB.NET Pin
Kenneth Haugland17-Jun-15 10:01
mvaKenneth Haugland17-Jun-15 10:01 
AnswerRe: Generic problem of VB.NET Pin
Richard MacCutchan17-Jun-15 21:21
mveRichard MacCutchan17-Jun-15 21:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.