Click here to Skip to main content
15,347,000 members
Home / Discussions / C#
   

C#

 
GeneralRe: Lock the Computer Pin
Eddy Vluggen5-Jul-16 0:51
professionalEddy Vluggen5-Jul-16 0:51 
QuestionHow to reach a file under a folder inside a solution in VS C# Pin
jasonalien30-Jun-16 21:57
Memberjasonalien30-Jun-16 21:57 
AnswerRe: How to reach a file under a folder inside a solution in VS C# Pin
OriginalGriff30-Jun-16 22:11
mveOriginalGriff30-Jun-16 22:11 
Questionmultithreaded ping IPs Pin
alireza barzin30-Jun-16 20:16
Memberalireza barzin30-Jun-16 20:16 
AnswerRe: multithreaded ping IPs Pin
OriginalGriff30-Jun-16 21:17
mveOriginalGriff30-Jun-16 21:17 
QuestionHow to make REST requests with C# Pin
Member 1090638630-Jun-16 10:24
MemberMember 1090638630-Jun-16 10:24 
AnswerRe: How to make REST requests with C# Pin
ZurdoDev30-Jun-16 10:29
professionalZurdoDev30-Jun-16 10:29 
Questionnot save my the data Pin
antonio_dsanchez29-Jun-16 10:43
Memberantonio_dsanchez29-Jun-16 10:43 
C#
I'm working on dataGrid Save content based on SQL Server data, C # smart devices and I have all the code I do not make mistake but not save data



C#
 /////////////////inicio guardar 
               //cadena de conexion
string partDir = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);
string partBD = System.IO.Path.Combine(partDir, "embarque.sdf");
string connectionstring = string.Format(@"DataSource={0}; Password ='root'", partBD);

try
{
	using (SqlCeConnection con = new SqlCeConnection(connectionstring))
	{
		string ConsultaSQL = "INSERT INTO ENVIO VALUES(@RAID, @NPARTE, @CANTIDAD, @VENTANA, @LIDER, @FECHA)";
        
		foreach (DataRow row in dt.Rows)
		{
            SqlCeCommand cmd = new SqlCeCommand(ConsultaSQL, con);
			
			cmd.Parameters.Clear();

			cmd.Parameters.AddWithValue("@RAID", Convert.ToString(row["Raid"].ToString()));
			cmd.Parameters.AddWithValue("@NPARTE", Convert.ToString(row["Nparte"].ToString()));
			cmd.Parameters.AddWithValue("@CANTIDAD", Convert.ToString(row["Cantidad"].ToString()));
			cmd.Parameters.AddWithValue("@VENTANA", Convert.ToString(row["Ventana"].ToString()));
			cmd.Parameters.AddWithValue("@LIDER", Convert.ToString(row["Lider"].ToString()));
			cmd.Parameters.AddWithValue("@FECHA", Convert.ToString(row["Fecha"].ToString()));
			
			con.Open();

			cmd.ExecuteNonQuery();
            
            con.Close();
	   }
      
	}	
   
	MessageBox.Show("Datos Agregados");
    
}
catch (Exception ex)
{
	MessageBox.Show(ex.Message);
}
              ///////////////fin guardado

AnswerRe: not save my the data Pin
Pete O'Hanlon29-Jun-16 11:28
mvaPete O'Hanlon29-Jun-16 11:28 
AnswerRe: not save my the data Pin
OriginalGriff29-Jun-16 19:02
mveOriginalGriff29-Jun-16 19:02 
QuestionTrouble With .Net XmlSerializer Pin
Jacob Himes28-Jun-16 22:24
professionalJacob Himes28-Jun-16 22:24 
AnswerRe: Trouble With .Net XmlSerializer Pin
Gerry Schmitz29-Jun-16 5:13
mveGerry Schmitz29-Jun-16 5:13 
QuestionHow do you import and secure a file? Pin
SolJohnston77728-Jun-16 6:21
professionalSolJohnston77728-Jun-16 6:21 
AnswerRe: How do you import and secure a file? Pin
Eddy Vluggen28-Jun-16 7:02
professionalEddy Vluggen28-Jun-16 7:02 
AnswerRe: How do you import and secure a file? Pin
Dave Kreskowiak28-Jun-16 12:20
mveDave Kreskowiak28-Jun-16 12:20 
GeneralRe: How do you import and secure a file? Pin
SolJohnston77730-Jun-16 9:34
professionalSolJohnston77730-Jun-16 9:34 
PraiseWhy don't use C#6 code for ASP.Net MVC application? Pin
Hein Pauwelyn28-Jun-16 3:40
MemberHein Pauwelyn28-Jun-16 3:40 
AnswerRe: Why don't use C#6 code for ASP.Net MVC application? Pin
Dave Kreskowiak28-Jun-16 3:42
mveDave Kreskowiak28-Jun-16 3:42 
GeneralRe: Why don't use C#6 code for ASP.Net MVC application? Pin
Richard Deeming28-Jun-16 4:01
mveRichard Deeming28-Jun-16 4:01 
GeneralRe: Why don't use C#6 code for ASP.Net MVC application? Pin
BillWoodruff29-Jun-16 8:43
mveBillWoodruff29-Jun-16 8:43 
QuestionEWS Managed API : "The SMTP address has no mailbox associated with it." Pin
Kuthuparakkal28-Jun-16 2:16
MemberKuthuparakkal28-Jun-16 2:16 
AnswerRe: EWS Managed API : "The SMTP address has no mailbox associated with it." Pin
OriginalGriff28-Jun-16 2:25
mveOriginalGriff28-Jun-16 2:25 
QuestionFloating window implementation using c# Pin
srikrishnathanthri27-Jun-16 19:49
Membersrikrishnathanthri27-Jun-16 19:49 
QuestionNeed Help with Assignment board logic. Pin
Aspylacide27-Jun-16 15:38
MemberAspylacide27-Jun-16 15:38 
AnswerRe: Need Help with Assignment board logic. Pin
Gerry Schmitz27-Jun-16 19:52
mveGerry Schmitz27-Jun-16 19:52 

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.