Click here to Skip to main content
16,015,393 members
Home / Discussions / C#
   

C#

 
AnswerRe: how to add new line to text box Pin
FlytotheBluesky10-Dec-09 22:22
FlytotheBluesky10-Dec-09 22:22 
QuestionBest way to set up this table in a custom list/array? Pin
Jan Sommer14-Sep-08 21:06
Jan Sommer14-Sep-08 21:06 
AnswerRe: Best way to set up this table in a custom list/array? Pin
J4amieC14-Sep-08 21:56
J4amieC14-Sep-08 21:56 
GeneralRe: Best way to set up this table in a custom list/array? [modified] Pin
Jan Sommer14-Sep-08 22:14
Jan Sommer14-Sep-08 22:14 
GeneralRe: Best way to set up this table in a custom list/array? Pin
DaveyM6914-Sep-08 23:15
professionalDaveyM6914-Sep-08 23:15 
GeneralRe: Best way to set up this table in a custom list/array? Pin
Jan Sommer15-Sep-08 1:05
Jan Sommer15-Sep-08 1:05 
GeneralRe: Best way to set up this table in a custom list/array? Pin
DaveyM6915-Sep-08 1:23
professionalDaveyM6915-Sep-08 1:23 
Questionwhy the formview didn't appear even with correct query lines. ? Pin
nazaa14-Sep-08 20:58
nazaa14-Sep-08 20:58 
lb_MSNo is linkbutton in the Machine Warranty Formview.

Why the servicing_details formview still didn't appear?


[^]

protected void lb_MSNo_Click(object sender, EventArgs e)
{

OdbcCommand cmd; OdbcDataReader reader;
//OdbcConnection connection = WebConfigurationManager.GetConnectionObject();

OdbcConnection connection = new OdbcConnection();connection.ConnectionString = WebConfigurationManager.ConnectionStrings["TamiConnectionString"].ConnectionString;


try
{

LinkButton a = (LinkButton)FV_ResultsS.FindControl("lb_MSNo");

string mw = "SELECT job_id FROM machine_warranty, warranty_period, job WHERE machine_warranty.machine_warranty_id= warranty_period.machine_warranty_id and Machine_SerialNo=" + a.Text + " and job.machine_warranty_id = Machine_Warranty.Machine_Warranty_ID AND machine_warranty.machine_warranty_id=job.machine_warranty_id";


connection.Open();

using (cmd = new OdbcCommand(mw, connection))
{

reader = cmd.ExecuteReader();

while (reader.Read())
{

mw = reader.GetInt32(0).ToString();

}

}

connection.Close();



ds_ServinMW.SelectCommand = "SELECT servicing_id, job.job_id, job_status, job_type, job_no, date_format(Date_Serviced,'%Y-%m-%d') as date_serviced, date_format(date_job_issued,'%Y-%m-%d') as date_job_issued, remarks FROM job, servicing_details, machine_warranty WHERE servicing_details.job_id=job.job_id and job.machine_warranty_id=Machine_Warranty.Machine_Warranty_ID AND job.job_id = "+ mw;
ds_ServinMW.DataBind();



}

catch

{ }

finally

{

connection.Dispose();

}

string test = ds_ServinMW.SelectCommand;
FV_servinMW.DataBind();

FV_servinMW.Visible = true;
}

}
AnswerRe: why the formview didn't appear even with correct query lines. ? Pin
Harvey Saayman15-Sep-08 0:30
Harvey Saayman15-Sep-08 0:30 
QuestionSearch Functionality in C# .net2.0. Pin
sailesh_gupta14-Sep-08 20:22
sailesh_gupta14-Sep-08 20:22 
AnswerRe: Search Functionality in C# .net2.0. Pin
Ajay.k_Singh14-Sep-08 21:28
Ajay.k_Singh14-Sep-08 21:28 
QuestionHow to get a environment setup for opengl in .net 2005 Pin
rajesh kumar swain14-Sep-08 19:48
rajesh kumar swain14-Sep-08 19:48 
AnswerRe: How to get a environment setup for opengl in .net 2005 Pin
User 665814-Sep-08 19:54
User 665814-Sep-08 19:54 
QuestionIndexed images with Graphics class Pin
gigahertz20514-Sep-08 19:44
gigahertz20514-Sep-08 19:44 
AnswerRe: Indexed images with Graphics class Pin
Mark Salsbery15-Sep-08 6:35
Mark Salsbery15-Sep-08 6:35 
QuestionUnicode Code of a chracter Pin
Laji5914-Sep-08 19:12
Laji5914-Sep-08 19:12 
AnswerRe: Unicode Code of a chracter Pin
User 665814-Sep-08 19:38
User 665814-Sep-08 19:38 
GeneralRe: Unicode Code of a chracter Pin
Laji5914-Sep-08 20:00
Laji5914-Sep-08 20:00 
GeneralRe: Unicode Code of a chracter Pin
Anthony Mushrow14-Sep-08 22:35
professionalAnthony Mushrow14-Sep-08 22:35 
GeneralRe: Unicode Code of a chracter Pin
DaveyM6914-Sep-08 23:27
professionalDaveyM6914-Sep-08 23:27 
AnswerRe: Unicode Code of a chracter Pin
Guffa14-Sep-08 21:16
Guffa14-Sep-08 21:16 
GeneralRe: Unicode Code of a chracter Pin
leppie14-Sep-08 23:11
leppie14-Sep-08 23:11 
GeneralRe: Unicode Code of a chracter Pin
Harvey Saayman15-Sep-08 0:34
Harvey Saayman15-Sep-08 0:34 
GeneralRe: Unicode Code of a chracter Pin
leppie15-Sep-08 0:40
leppie15-Sep-08 0:40 
Question.gif File in C# Pin
Syed Shahid Hussain14-Sep-08 17:42
Syed Shahid Hussain14-Sep-08 17:42 

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.