public long SaveOrUpdateExcelDocuments(ExcelDocuments ed, string userId) { try { return(invoiceBc.SaveOrUpdateExcelDocuments(ed, userId)); } catch (Exception ex) { throw ex; } }
public long SaveOrUpdateExcelDocuments(ExcelDocuments ed, string userId) { try { if (ed != null && ed.Id > 0) { ed.ModifiedBy = userId; ed.ModifiedDate = DateTime.Now; PSF.Update <ExcelDocuments>(ed); } else { ed.CreatedBy = userId; ed.CreatedDate = DateTime.Now; PSF.Save <ExcelDocuments>(ed); } return(ed.Id); } catch (Exception ex) { throw ex; } }