public void AddFiledtl(filemanagerdtl record) { frssdbEntities entities = new frssdbEntities(); var data = entities.filemanagerdtls.Add(record); entities.SaveChanges(); }
public void UpdateFiledtl(filemanagerdtl record) { frssdbEntities entities = new frssdbEntities(); entities.Entry(record).State = System.Data.Entity.EntityState.Modified; entities.SaveChanges(); }
public filemanagerdtl GetFileDetailsById(string fileid, string custid) { frssdbEntities entities = new frssdbEntities(); filemanagerdtl filemgr = entities.filemanagerdtls.FirstOrDefault(s => s.fileid == fileid && s.custid == custid); if (filemgr == null) { return(null); } return(filemgr); }
public long GetLastFiledtlId() { long lastFieldId = 0; string value = string.Empty; using (frssdbEntities entities = new frssdbEntities()) { filemanagerdtl lastRecord = entities.filemanagerdtls.OrderByDescending(fm => fm.filedtlid1).FirstOrDefault(); if (lastRecord != null) { lastFieldId = lastRecord.filedtlid1.Value; } } return(lastFieldId); }