Beispiel #1
0
 public void SaveDocTypeTemplate(Shtoda_docTypeTemplates item)
 {
     try
     {
         _db.SaveDocTypeTemplate(item);
     }
     catch (Exception ex)
     {
         _debug(ex, new { item }, "");
     }
 }
Beispiel #2
0
        public Shtoda_docTypeTemplates GetDocTypeTemplate(int id)
        {
            var res = new Shtoda_docTypeTemplates();

            try
            {
                res = _db.GetDocTypeTemplates().FirstOrDefault(x => x.id == id);
            }
            catch (Exception ex)
            {
                _debug(ex, new { id }, "id");
            }
            return(res);
        }
Beispiel #3
0
 public int SaveDocTypeTemplate(Shtoda_docTypeTemplates element, bool withSave = true)
 {
     if (element.id == 0)
     {
         db.Shtoda_docTypeTemplates.Add(element);
     }
     else
     {
         db.Entry(element).State = EntityState.Modified;
     }
     if (withSave)
     {
         Save();
     }
     return(element.id);
 }