Beispiel #1
0
        public void AddFiledtl(filemanagerdtl record)
        {
            frssdbEntities entities = new frssdbEntities();
            var            data     = entities.filemanagerdtls.Add(record);

            entities.SaveChanges();
        }
Beispiel #2
0
        public void UpdateFiledtl(filemanagerdtl record)
        {
            frssdbEntities entities = new frssdbEntities();

            entities.Entry(record).State = System.Data.Entity.EntityState.Modified;
            entities.SaveChanges();
        }
Beispiel #3
0
        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);
        }
Beispiel #4
0
        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);
        }