Click here to Skip to main content
15,307,289 members
Home / Discussions / C#
   

C#

 
AnswerRe: Image compression Pin
Abhinav S28-Sep-12 17:00
MemberAbhinav S28-Sep-12 17:00 
Questiongeneric queue synchronisation Pin
Ramu katturi28-Sep-12 3:18
MemberRamu katturi28-Sep-12 3:18 
AnswerRe: generic queue synchronisation Pin
Dave Kreskowiak28-Sep-12 3:58
mveDave Kreskowiak28-Sep-12 3:58 
Questionupdate in LINQ to SQL is not working for C#.Net? Pin
Jineesh TR27-Sep-12 23:26
professionalJineesh TR27-Sep-12 23:26 
AnswerRe: update in LINQ to SQL is not working for C#.Net? Pin
J4amieC28-Sep-12 0:09
MemberJ4amieC28-Sep-12 0:09 
GeneralRe: update in LINQ to SQL is not working for C#.Net? Pin
Jineesh TR28-Sep-12 0:18
professionalJineesh TR28-Sep-12 0:18 
GeneralRe: update in LINQ to SQL is not working for C#.Net? Pin
Dave Kreskowiak28-Sep-12 1:22
mveDave Kreskowiak28-Sep-12 1:22 
GeneralRe: update in LINQ to SQL is not working for C#.Net? Pin
Jineesh TR30-Sep-12 19:44
professionalJineesh TR30-Sep-12 19:44 
Thank you Dave Kreskowiak,

This is the code for saving the 'asset' details. The asset details are saving in to the table TblAsset.

public static LINQtoSQLAssetMeterDataContext dc=new LINQtoSQLAssetMeterDataContext("ConnectionString");

protected override void Save()
       {
           if (clsTblAsset == null) clsTblAsset = new TblAsset();
           clsTblAsset.AssetConditionId = cmbAssetCondition.SelectedValue.getInteger();
           clsTblAsset.SerialNo = txtSerialNo.Text.getString();
           clsTblAsset.ServiceTag = txtServiceTag.Text.getString();
           clsTblAsset.CostCenterId = cmbCostCenter.SelectedValue.getInteger();
           clsTblAsset.AssetStatusId = cmbAssetStatus.SelectedValue.getInteger();
           clsTblAsset.Description = txtDescription.Text.getString();
           clsTblAsset.LocationId = cmbLocation.SelectedValue.getInteger();
           clsTblAsset.AssetNo = txtAssetNo.Text.getString();
           if (pictBarcode.Image != null)
               clsTblAsset.BarCode = barcodePict;
           if (pictAsset.Image != null)
               clsTblAsset.AssetPict = assetPict;
           clsTblAsset.Notes = txtNotes.Text.getString();
           if (clsTblAsset.AssetId == 0)
           {
               clsTblAsset.StockId = ucItem._Id.getInteger();
               clsTblAsset.RefId = 0;
               clsTblAsset.RefModule = "S";
               clsTblAsset.AssetEntryDate = DateTime.Now.Date.getDateTime();
               clsTblAsset.LoginId = ClsParameters.LogInId;
               dc.TblAssets.InsertOnSubmit(clsTblAsset);
           }
           dc.SubmitChanges();
       }




If the AssetId is zero, then details are inserted to the table. and if the AssetId>0, asset details are updated to the table.

Here the problem I am facing is that,
Once if we insert in to the table, all the details are inserted properly. Once if we are editing an 'asset' data and changing the value and updating the table, The data is not get updated. But no errors or exception is occuring.

Please let me know, if any one knows it.

Regards,
Jini4

GeneralRe: update in LINQ to SQL is not working for C#.Net? Pin
Dave Kreskowiak1-Oct-12 2:05
mveDave Kreskowiak1-Oct-12 2:05 
GeneralRe: update in LINQ to SQL is not working for C#.Net? Pin
anglesen11202-Oct-12 18:23
Memberanglesen11202-Oct-12 18:23 
AnswerRe: update in LINQ to SQL is not working for C#.Net? Pin
Emmanuel Medina28-Sep-12 9:48
professionalEmmanuel Medina28-Sep-12 9:48 
GeneralRe: update in LINQ to SQL is not working for C#.Net? Pin
Jineesh TR30-Sep-12 19:41
professionalJineesh TR30-Sep-12 19:41 
Questionupload a song into database... Pin
sri apple27-Sep-12 21:37
Membersri apple27-Sep-12 21:37 
AnswerRe: upload a song into database... Pin
Smart Arab27-Sep-12 22:13
MemberSmart Arab27-Sep-12 22:13 
AnswerRe: upload a song into database... Pin
Abhinav S27-Sep-12 22:25
MemberAbhinav S27-Sep-12 22:25 
QuestionRead Emails Pin
Kevin Marois27-Sep-12 12:59
professionalKevin Marois27-Sep-12 12:59 
AnswerRe: Read Emails Pin
Sarath C27-Sep-12 20:22
MemberSarath C27-Sep-12 20:22 
AnswerRe: Read Emails Pin
Ravi Bhavnani28-Sep-12 6:12
professionalRavi Bhavnani28-Sep-12 6:12 
QuestionC# problem passing mine value Pin
classy_dog27-Sep-12 12:13
Memberclassy_dog27-Sep-12 12:13 
AnswerRe: C# problem passing mine value Pin
Dave Kreskowiak27-Sep-12 13:35
mveDave Kreskowiak27-Sep-12 13:35 
QuestionC# format date Pin
classy_dog27-Sep-12 6:45
Memberclassy_dog27-Sep-12 6:45 
AnswerRe: C# format date Pin
Ravi Bhavnani27-Sep-12 6:49
professionalRavi Bhavnani27-Sep-12 6:49 
AnswerRe: C# format date Pin
Smart Arab27-Sep-12 10:12
MemberSmart Arab27-Sep-12 10:12 
GeneralMy vote of 1 Pin
J4amieC27-Sep-12 21:37
MemberJ4amieC27-Sep-12 21:37 
AnswerRe: C# format date Pin
Keith Barrow27-Sep-12 10:44
professionalKeith Barrow27-Sep-12 10:44 

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.