Example #1
0
        public async Task AddNewBeeComingById(int id, FormCollection collection)
        {
            var picked = _beeComingsRepository.Get().Where(i => i.Id == id).ToList()[0];

            picked.ReceiptDate  = DateTime.Parse(collection[1]);
            picked.CultureType  = collection[2];
            picked.Name         = collection[3];
            picked.CurrencyType = collection[4];
            picked.Cost         = Convert.ToDecimal(collection[5].Replace(".", ","));
            picked.Amount       = Convert.ToInt32(collection[6]);
            picked.Document     = FileNameValidator(collection[7]);

            await _beeComingsRepository.UpdateAsync(picked);
        }