Click here to Skip to main content
15,891,734 members
Home / Discussions / C#
   

C#

 
GeneralRe: Visual Studio 10 Naming Issue? Pin
PDTUM28-Sep-12 13:31
PDTUM28-Sep-12 13:31 
AnswerRe: Visual Studio 10 Naming Issue? Pin
Smart Arab28-Sep-12 22:20
Smart Arab28-Sep-12 22:20 
GeneralRe: Visual Studio 10 Naming Issue? Pin
PDTUM3-Oct-12 5:25
PDTUM3-Oct-12 5:25 
GeneralRe: Visual Studio 10 Naming Issue? Pin
Smart Arab3-Oct-12 7:01
Smart Arab3-Oct-12 7:01 
QuestionC# database error Pin
classy_dog28-Sep-12 6:50
classy_dog28-Sep-12 6:50 
AnswerRe: C# database error Pin
Matt U.28-Sep-12 6:59
Matt U.28-Sep-12 6:59 
AnswerRe: C# database error Pin
Emmanuel Medina28-Sep-12 9:40
professionalEmmanuel Medina28-Sep-12 9:40 
QuestionImage compression Pin
hardiksince198728-Sep-12 6:13
hardiksince198728-Sep-12 6:13 
AnswerRe: Image compression Pin
Ravi Bhavnani28-Sep-12 6:15
professionalRavi Bhavnani28-Sep-12 6:15 
AnswerRe: Image compression Pin
Abhinav S28-Sep-12 17:00
Abhinav S28-Sep-12 17:00 
Questiongeneric queue synchronisation Pin
Ramu katturi28-Sep-12 3:18
Ramu 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
J4amieC28-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
anglesen11202-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
sri apple27-Sep-12 21:37 
AnswerRe: upload a song into database... Pin
Smart Arab27-Sep-12 22:13
Smart Arab27-Sep-12 22:13 
AnswerRe: upload a song into database... Pin
Abhinav S27-Sep-12 22:25
Abhinav S27-Sep-12 22:25 
QuestionRead Emails Pin
Kevin Marois27-Sep-12 12:59
professionalKevin Marois27-Sep-12 12:59 

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.