Esempio n. 1
0
 public static AttachmentInfo Create(AttachmentInfo model)
 {
     if (model.Id == 0)
     {
         model.Id = AttachmentManage.Add(model);
     }
     else
     {
         AttachmentManage.Edit(model);
     }
     return(model);
 }
Esempio n. 2
0
 public static AttachmentInfo Update(AttachmentInfo model)
 {
     if (model.Id > 0)
     {
         AttachmentManage.Update(model);
     }
     else
     {
         int id = AttachmentManage.Add(model);
         model.Id = id;
     }
     return(model);
 }