Click here to Skip to main content
15,897,704 members
Home / Discussions / C#
   

C#

 
QuestionWindows Name Pin
M Riaz Bashir6-Jul-11 19:47
M Riaz Bashir6-Jul-11 19:47 
AnswerRe: Windows Name PinPopular
Wayne Gaylard6-Jul-11 20:42
professionalWayne Gaylard6-Jul-11 20:42 
GeneralRe: Windows Name Pin
M Riaz Bashir6-Jul-11 20:43
M Riaz Bashir6-Jul-11 20:43 
QuestionWhy is the Insert done once while there are 13 Records Pin
Vimalsoft(Pty) Ltd6-Jul-11 8:20
professionalVimalsoft(Pty) Ltd6-Jul-11 8:20 
AnswerRe: Why is the Insert done once while there are 13 Records Pin
#realJSOP6-Jul-11 8:44
professional#realJSOP6-Jul-11 8:44 
GeneralRe: Why is the Insert done once while there are 13 Records Pin
Vimalsoft(Pty) Ltd6-Jul-11 9:14
professionalVimalsoft(Pty) Ltd6-Jul-11 9:14 
AnswerRe: Why is the Insert done once while there are 13 Records Pin
GenJerDan6-Jul-11 9:19
GenJerDan6-Jul-11 9:19 
GeneralRe: Why is the Insert done once while there are 13 Records Pin
Vimalsoft(Pty) Ltd6-Jul-11 9:41
professionalVimalsoft(Pty) Ltd6-Jul-11 9:41 
i have change it to look like this

foreach (EcashProductCatModel ecash in model)
{
 using (var cmdinsert = new SqlCommand("sp_AddProductCategory", con))
 {
  cmdinsert.CommandType = CommandType.StoredProcedure;

  cmdinsert.Parameters.Add("@CATEGORY_ID", SqlDbType.Int).Value = ecash.CATEGORY_ID;
  cmdinsert.Parameters.Add("@CATEGORY_DESCRIPTION", SqlDbType.VarChar).Value =
   ecash.CATEGORY_DESCRIPTION;
  cmdinsert.Parameters.Add("@SCHOOLID", SqlDbType.Int).Value = ecash.SCHOOLID;
  cmdinsert.ExecuteNonQuery();
 }

}


and its working perfectly

Thanks
Vuyiswa Maseko,

Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.

C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/

AnswerRe: Why is the Insert done once while there are 13 Records Pin
PIEBALDconsult6-Jul-11 14:19
mvePIEBALDconsult6-Jul-11 14:19 
Questionhow to display the output from LM35 on pc in C# Pin
aeman6-Jul-11 4:47
aeman6-Jul-11 4:47 
AnswerRe: how to display the output from LM35 on pc in C# Pin
Alan N6-Jul-11 7:33
Alan N6-Jul-11 7:33 
GeneralRe: how to display the output from LM35 on pc in C# Pin
aeman6-Jul-11 22:14
aeman6-Jul-11 22:14 
GeneralRe: how to display the output from LM35 on pc in C# Pin
Richard MacCutchan7-Jul-11 1:51
mveRichard MacCutchan7-Jul-11 1:51 
GeneralRe: how to display the output from LM35 on pc in C# Pin
aeman7-Jul-11 2:02
aeman7-Jul-11 2:02 
GeneralRe: how to display the output from LM35 on pc in C# Pin
Richard MacCutchan7-Jul-11 2:23
mveRichard MacCutchan7-Jul-11 2:23 
AnswerRe: how to display the output from LM35 on pc in C# Pin
PIEBALDconsult6-Jul-11 14:20
mvePIEBALDconsult6-Jul-11 14:20 
GeneralRe: how to display the output from LM35 on pc in C# Pin
aeman6-Jul-11 22:15
aeman6-Jul-11 22:15 
GeneralRe: how to display the output from LM35 on pc in C# Pin
BobJanova6-Jul-11 22:32
BobJanova6-Jul-11 22:32 
GeneralRe: how to display the output from LM35 on pc in C# Pin
aeman6-Jul-11 23:48
aeman6-Jul-11 23:48 
GeneralRe: how to display the output from LM35 on pc in C# Pin
Thomas Krojer7-Jul-11 0:37
Thomas Krojer7-Jul-11 0:37 
GeneralRe: how to display the output from LM35 on pc in C# Pin
aeman7-Jul-11 1:58
aeman7-Jul-11 1:58 
GeneralRe: how to display the output from LM35 on pc in C# Pin
BobJanova7-Jul-11 4:26
BobJanova7-Jul-11 4:26 
GeneralRe: how to display the output from LM35 on pc in C# Pin
PIEBALDconsult7-Jul-11 2:52
mvePIEBALDconsult7-Jul-11 2:52 
QuestionHow to work for Name Property Pin
Anubhava Dimri6-Jul-11 1:22
Anubhava Dimri6-Jul-11 1:22 
AnswerRe: How to work for Name Property Pin
Mario Majčica6-Jul-11 1:25
professionalMario Majčica6-Jul-11 1:25 

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.