Click here to Skip to main content
15,895,667 members

Comments by S. Karthik - Hosur (Top 6 by date)

S. Karthik - Hosur 30-May-12 11:29am View    
if (r.HasRows) { r.Read(); txtIvestorName.Text = r.GetString("accountname"); txtRMemberId.Text = r.GetString("refererid"); txtRAmount.Text = r.GetString("investment"); txtTableNo.Text = r.GetString("tableno"); dtpClosingDate.Value = r.GetDateTime("dateofexpiry"); FillHistory(); }

this values
S. Karthik - Hosur 30-May-12 11:28am View    
Deleted
if (r.HasRows) { r.Read(); txtIvestorName.Text = r.GetString("accountname"); txtRMemberId.Text = r.GetString("refererid"); txtRAmount.Text = r.GetString("investment"); txtTableNo.Text = r.GetString("tableno"); dtpClosingDate.Value = r.GetDateTime("dateofexpiry"); FillHistory();

this values-based
S. Karthik - Hosur 30-May-12 10:40am View    
the issue is :- how to call the value from database

if (cmbPlan.Text == "SID")
{
try
{
using (MySqlConnection con = new MySqlConnection(GlobalVariables.ConnectionString))
{
con.Open();
string qry = "SELECT customerid, agreementdate, accountname, refererid, tableno, dateofexpiry FROM investers_sid WHERE investeridsid LIKE '" + txtCustomerId.Text.Trim() + "' AND plan LIKE '" + cmbPlan.Text + "' ";
if (radCE.Checked == true)
{
qry += "AND ceid=" + txtMemberID.Text.Substring(5);
}
else
{
qry += "AND refererid=" + txtMemberID.Text.Substring(5);
}
MySqlCommand cmd = new MySqlCommand(qry, con);
MySqlDataReader r = cmd.ExecuteReader();
if (r.HasRows)
{
r.Read();
txtIvestorName.Text = r.GetString("accountname");
txtRMemberId.Text = r.GetString("refererid");
txtRAmount.Text = r.GetString("investment");
txtTableNo.Text = r.GetString("tableno");
dtpClosingDate.Value = r.GetDateTime("dateofexpiry");
FillHistory();
}
else
{
txtIvestorName.Text = "";
txtRMemberId.Text = "";
txtRAmount.Text = "";
txtLateFee.Text = "0";
txtTableNo.Text = "";
dtpClosingDate.Value = DateTime.Now;
dgInvestorHistory.DataSource = null;
}
}
}
catch (MySqlException ex)
{
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
else
{
txtIvestorName.Text = "";
txtRMemberId.Text = "";
txtRAmount.Text = "";
txtLateFee.Text = "0";
txtTableNo.Text = "";
dtpClosingDate.Value = DateTime.Now;
}
S. Karthik - Hosur 30-May-12 10:01am View    
i con't understand... please help me...
S. Karthik - Hosur 30-May-12 9:26am View    
Error 1 The name 'myIdToSearchFor' does not exist in the current context

i am a beginner i don't know how to fix it... please help me...