private JournalEntryDtlViewModel CopyDetails(JournalEntryDtlViewModel source, JournalEntryDtlViewModel dest)
        {
            var    dtl = new JournalEntryDtlViewModel();
            string id  = string.IsNullOrEmpty(source.id)?Guid.NewGuid().ToString():source.id;

            dtl.id          = id;
            dtl.remarks     = source.remarks;
            dtl.description = source.description;
            dtl.type        = source.type;
            dtl.amount      = source.amount;
            dtl.accountId   = source.accountId;
            dtl.accountCode = source.accountCode;
            dtl.accountName = source.accountName;
            dtl.reference   = source.reference;

            return(dtl);
        }
示例#2
0
        protected override async Task OnInitializedAsync()
        {
            try
            {
                UserName = await _sessionStorageService.GetItemAsync <string>("UserName");

                CompanyId = await _sessionStorageService.GetItemAsync <string>("CompanyId");

                IsDataLoaded    = false;
                JournalEntryDtl = new JournalEntryDtlViewModel();
                GLAccounts      = await appDBContext.GLAccounts.Where(a => a.companyId.Equals(CompanyId)).ToListAsync();
            }
            catch (Exception ex)
            {
                ErrorMessage = ex.Message;
            }
            finally
            {
                IsDataLoaded = true;
            }
        }