/// <summary> /// Saves this instance. /// </summary> /// <returns></returns> public int Save() { var voucher = new VoucherListModel { VoucherListId = View.VoucherListId, VoucherListCode = View.VoucherListCode, VoucherDate = View.VoucherDate, PostDate = View.PostDate, Description = View.Description, DocAttach = View.DocAttach, }; return(View.VoucherListId == 0 ? Model.InsertVoucherList(voucher) : Model.UpdateVoucherList(voucher)); }
/// <summary> /// Saves this instance. /// </summary> /// <returns></returns> public string Save() { var voucherList = new VoucherListModel { VoucherListId = View.VoucherListId, VoucherListCode = View.VoucherListCode, VoucherListName = View.VoucherListName, DocumentAttached = View.DocumentAttached, FromDate = View.FromDate, ToDate = View.ToDate, Description = View.Description, IsActive = View.IsActive }; return(View.VoucherListId == null?Model.InsertVoucherList(voucherList) : Model.UpdateVoucherList(voucherList)); }