Click here to Skip to main content
15,904,638 members
Home / Discussions / C#
   

C#

 
AnswerRe: porting from XNA to MonoGame Pin
Gerry Schmitz13-Oct-14 11:25
mveGerry Schmitz13-Oct-14 11:25 
GeneralRe: porting from XNA to MonoGame Pin
paulrm13-Oct-14 12:44
paulrm13-Oct-14 12:44 
AnswerRe: porting from XNA to MonoGame Pin
paulrm13-Oct-14 13:59
paulrm13-Oct-14 13:59 
QuestionHow to embed a video in my c# based dot net website which should be compatible in all browsers especially chrome. Pin
Member 1107698013-Oct-14 1:18
Member 1107698013-Oct-14 1:18 
AnswerRe: How to embed a video in my c# based dot net website which should be compatible in all browsers especially chrome. Pin
Pete O'Hanlon13-Oct-14 3:03
mvePete O'Hanlon13-Oct-14 3:03 
QuestionAutomation for WPF application with using Coded UI tool Pin
Member 1114888912-Oct-14 23:04
Member 1114888912-Oct-14 23:04 
AnswerRe: Automation for WPF application with using Coded UI tool Pin
Pete O'Hanlon13-Oct-14 0:08
mvePete O'Hanlon13-Oct-14 0:08 
Questionmovable combobox in datagridview in C# windows application Pin
ranjeet1112-Oct-14 21:51
ranjeet1112-Oct-14 21:51 
QuestionAccessing WCF from Excel/VBA Pin
devvvy12-Oct-14 5:19
devvvy12-Oct-14 5:19 
QuestionRe: Accessing WCF from Excel/VBA Pin
Richard MacCutchan12-Oct-14 8:57
mveRichard MacCutchan12-Oct-14 8:57 
AnswerRe: Accessing WCF from Excel/VBA Pin
CHill6012-Oct-14 9:11
mveCHill6012-Oct-14 9:11 
AnswerRe: Accessing WCF from Excel/VBA Pin
devvvy14-Oct-14 8:04
devvvy14-Oct-14 8:04 
AnswerRe: Accessing WCF from Excel/VBA Pin
Mycroft Holmes12-Oct-14 12:46
professionalMycroft Holmes12-Oct-14 12:46 
GeneralRe: Accessing WCF from Excel/VBA Pin
devvvy13-Oct-14 9:29
devvvy13-Oct-14 9:29 
GeneralRe: Accessing WCF from Excel/VBA Pin
Mycroft Holmes13-Oct-14 12:28
professionalMycroft Holmes13-Oct-14 12:28 
GeneralRe: Accessing WCF from Excel/VBA Pin
devvvy14-Oct-14 8:05
devvvy14-Oct-14 8:05 
Questionhow to delete a member of list<class> (list is Generic), by clicking button in form. Pin
cicill12-Oct-14 4:42
cicill12-Oct-14 4:42 
AnswerRe: how to delete a member of list<class> (list is Generic), by clicking button in form. Pin
BillWoodruff12-Oct-14 5:21
professionalBillWoodruff12-Oct-14 5:21 
QuestionHow to get the license key from here? Pin
Jassim Rahma11-Oct-14 10:11
Jassim Rahma11-Oct-14 10:11 
AnswerRe: How to get the license key from here? Pin
Garth J Lancaster11-Oct-14 13:11
professionalGarth J Lancaster11-Oct-14 13:11 
Questionmultiple Update query after Filter in datagridview Pin
AsthreA11-Oct-14 4:42
AsthreA11-Oct-14 4:42 
I'm new to c# and i'm using vs 2013 and access database..my i need to do multiple update records after I filtered the records in datagridview

in my database table I have these fields ID(PK/autonumber), EID,Date,Day,Daystatus..
In my form I have a button and it's fucntion is filter by date using bidingsource.fiter and this was the result

EID------Date-----------Day---Daystatus
10175--10/11/2014---sat--------regular
10176--10/11/2014---sat--------regular
10177--10/11/2014---sat--------regular
10178--10/11/2014---sat--------regular

what I want to happen is when I click another button called "Apply to all" I want to Update all the daystatus to "Legal Holiday" of the filtered records..I know how to update one by one using simple update..but I need to do the multiple update..

I tried to make a code but it was updating all the records not the filtered only here's my code hope someone can help me

try
{
OleDbCommand command = new OleDbCommand();
connection.Open();
command.Connection = connection;
string query = "SELECT EID From EmployeeTable";
command.CommandText = query;
String a = "Legal Holiday";
using (OleDbDataReader reader = command.ExecuteReader())
{
while (reader.Read())
{

OleDbCommand command2 = new OleDbCommand();
command2.Connection = connection;
//String counter2;
//String status = "Absent";

for (var i = 0; i < 1; i++)
{
command2.Connection = connection;
string query2 = "update EmployeeData set DayStatus='" + a + "'where EID='" + reader["EID"] + "'";
command2.CommandText = query2;
command2.ExecuteNonQuery();

}
}
MessageBox.Show("Successfully");



}
connection.Close();
}
catch (Exception ex)
{
MessageBox.Show("error" + ex);
}

modified 11-Oct-14 11:09am.

AnswerRe: multiple Update query after Filter in datagridview Pin
Richard Deeming13-Oct-14 2:21
mveRichard Deeming13-Oct-14 2:21 
Questioncreate Web browser in C# without using web browser control Pin
Member 1114079710-Oct-14 9:44
Member 1114079710-Oct-14 9:44 
AnswerRe: create Web browser in C# without using web browser control Pin
Eddy Vluggen10-Oct-14 9:46
professionalEddy Vluggen10-Oct-14 9:46 
AnswerRe: create Web browser in C# without using web browser control Pin
Pete O'Hanlon10-Oct-14 9:56
mvePete O'Hanlon10-Oct-14 9:56 

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.