Click here to Skip to main content
15,890,185 members
Home / Discussions / C#
   

C#

 
QuestionDynamically passing a variable list of parameters to a Generic delegate? Pin
Steve Holdorf25-Feb-09 9:32
Steve Holdorf25-Feb-09 9:32 
QuestionRe: Dynamically passing a variable list of parameters to a Generic delegate? Pin
Steve Holdorf25-Feb-09 10:16
Steve Holdorf25-Feb-09 10:16 
Questionwill firewall bolck the tcp listner ? Pin
Mubeen.asim25-Feb-09 8:40
Mubeen.asim25-Feb-09 8:40 
AnswerRe: will firewall bolck the tcp listner ? Pin
Christian Graus25-Feb-09 9:09
protectorChristian Graus25-Feb-09 9:09 
GeneralRe: will firewall bolck the tcp listner ? Pin
Mubeen.asim25-Feb-09 9:12
Mubeen.asim25-Feb-09 9:12 
GeneralRe: will firewall bolck the tcp listner ? Pin
EliottA25-Feb-09 10:36
EliottA25-Feb-09 10:36 
QuestionConverting grid values to lower case for update Pin
alwaysgull25-Feb-09 8:26
alwaysgull25-Feb-09 8:26 
QuestionConverting grid values to lower case for update Pin
alwaysgull25-Feb-09 8:09
alwaysgull25-Feb-09 8:09 
Hi I have a problem i hgaave a table in data grid view and i am updating data from data using a button. what i need to do is once the user update the data and click on update button i want to convert all string values to lower case. i am not using data table to populate my grid, is their any way that i can do that here is my code i am using to upgrade my grid

private void cmd_update_record_Click(object sender, EventArgs e)
{



if (dgRepair.RowCount == 0)
{

MessageBox.Show("No data available for update");
}


else
{

DataSet ChangedRepDataSet = new DataSet();
ChangedRepDataSet = ds_rep.GetChanges();


if (ChangedRepDataSet != null)
{


// Intializing object of Connectionclass to open connection
conn_obj = new ConnectionClass();
store_connection = conn_obj.connect();
// Sqlcommand object
SqlCommand cmdupdate;
cmdupdate = new SqlCommand();
cmdupdate.CommandType = CommandType.StoredProcedure;
cmdupdate.CommandText = "Update_Status_Grid";

//opening connection
cmdupdate.Connection = store_connection;
store_connection.Open();

//Adding Parameters for Repair table

cmdupdate.Parameters.Add("@OrgDescription", SqlDbType.VarChar, 100, "Description");
cmdupdate.Parameters["@OrgDescription"].SourceVersion = DataRowVersion.Original;
cmdupdate.Parameters.Add("@Description", SqlDbType.VarChar, 100, "Description");
cmdupdate.Parameters.Add("@OrgStatus", SqlDbType.VarChar, 15, "Status");
cmdupdate.Parameters["@OrgStatus"].SourceVersion = DataRowVersion.Original;
cmdupdate.Parameters.Add("@Status", SqlDbType.VarChar, 15, "Status");
cmdupdate.Parameters.Add("@OrgPartDes", SqlDbType.VarChar, 50, "PartDes");
cmdupdate.Parameters["@OrgPartDes"].SourceVersion = DataRowVersion.Original;
cmdupdate.Parameters.Add("@PartDes", SqlDbType.VarChar, 50, "PartDes");
cmdupdate.Parameters.Add("@OrgRepAction", SqlDbType.VarChar, 50, "RepAction");
cmdupdate.Parameters["@OrgRepAction"].SourceVersion = DataRowVersion.Original;
cmdupdate.Parameters.Add("@RepAction", SqlDbType.VarChar, 50, "RepAction");
cmdupdate.Parameters.Add("@OrgId", SqlDbType.BigInt ,1000, "Id");
cmdupdate.Parameters["@OrgId"].SourceVersion = DataRowVersion.Original;

//Adding the Parameters for invoice table
cmdupdate.Parameters.Add("@OrgRepCost", SqlDbType.Money, 1000, "RepCost");
cmdupdate.Parameters["@OrgRepCost"].SourceVersion = DataRowVersion.Original;
cmdupdate.Parameters.Add("@RepCost", SqlDbType.Money, 1000, "RepCost");
cmdupdate.Parameters.Add("@OrgPaymentPaid", SqlDbType.Money, 1000, "PaymentPaid");
cmdupdate.Parameters["@OrgPaymentPaid"].SourceVersion = DataRowVersion.Original;
cmdupdate.Parameters.Add("@PaymentPaid", SqlDbType.Money, 1000, "PaymentPaid");

da_rep.UpdateCommand = cmdupdate;






if (check == true)
{

try
{
da_rep.Update(ds_rep, "Repair");
ds_rep.AcceptChanges();
}


catch (Exception ex)
{
MessageBox.Show("Their is some problem in updating make sure you are entering right values " +
ex);
}
}

//}

//}
}
else
{
MessageBox.Show("no changes made");
}

//int modifiedRows = da_cus.Update(myChangedDataset);
//MessageBox.Show("Database has been updated successfully:" + no_of_rows_chang + " rows has been changed");

}

can any one help me

Thanks
AnswerRe: Converting grid values to lower case for update Pin
Rutvik Dave25-Feb-09 8:36
professionalRutvik Dave25-Feb-09 8:36 
GeneralRe: Converting grid values to lower case for update Pin
alwaysgull25-Feb-09 11:18
alwaysgull25-Feb-09 11:18 
AnswerRe: Converting grid values to lower case for update Pin
Wendelius25-Feb-09 8:44
mentorWendelius25-Feb-09 8:44 
QuestionGet Recycle Bin icon Pin
Nitoc325-Feb-09 8:09
Nitoc325-Feb-09 8:09 
AnswerRe: Get Recycle Bin icon Pin
Giorgi Dalakishvili25-Feb-09 8:41
mentorGiorgi Dalakishvili25-Feb-09 8:41 
QuestionTableLayoutPanel Cell Pin
Muammar©25-Feb-09 7:37
Muammar©25-Feb-09 7:37 
AnswerRe: TableLayoutPanel Cell Pin
Rutvik Dave25-Feb-09 8:27
professionalRutvik Dave25-Feb-09 8:27 
QuestionDrawImageUnscaled not working Pin
Richard Blythe25-Feb-09 6:43
Richard Blythe25-Feb-09 6:43 
AnswerRe: DrawImageUnscaled not working Pin
Luc Pattyn25-Feb-09 8:24
sitebuilderLuc Pattyn25-Feb-09 8:24 
QuestionForm Key Down Even not activated? Pin
Muammar©25-Feb-09 6:36
Muammar©25-Feb-09 6:36 
AnswerRe: Form Key Down Even not activated? Pin
Richard Blythe25-Feb-09 6:44
Richard Blythe25-Feb-09 6:44 
AnswerRe: Form Key Down Even not activated? Pin
Muammar©25-Feb-09 6:48
Muammar©25-Feb-09 6:48 
Questionis there a better way to do [modified] Pin
netJP12L25-Feb-09 6:18
netJP12L25-Feb-09 6:18 
AnswerRe: is there a better way to do Pin
Richard Blythe25-Feb-09 6:50
Richard Blythe25-Feb-09 6:50 
AnswerRe: is there a better way to do Pin
Dan Neely25-Feb-09 7:07
Dan Neely25-Feb-09 7:07 
GeneralRe: is there a better way to do Pin
Richard Blythe25-Feb-09 7:16
Richard Blythe25-Feb-09 7:16 
GeneralRe: is there a better way to do Pin
Dan Neely25-Feb-09 7:54
Dan Neely25-Feb-09 7:54 

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.