예제 #1
0
        public int Update(HeaderNotaMiniPos obj)
        {
            var result = 0;

            using (IDapperContext context = new DapperContext())
            {
                _unitOfWork = new UnitOfWork(context, _log);
                result      = _unitOfWork.HeaderNotaMiniPosRepository.Update(obj);
            }

            return(result);
        }
        public int Update(HeaderNotaMiniPos obj)
        {
            var result = 0;

            try
            {
                result = _context.db.Update <HeaderNotaMiniPos>(obj) ? 1 : 0;
            }
            catch (Exception ex)
            {
                _log.Error("Error:", ex);
            }

            return(result);
        }
예제 #3
0
        public int Update(HeaderNotaMiniPos obj, ref ValidationError validationError)
        {
            var validatorResults = _validator.Validate(obj);

            if (!validatorResults.IsValid)
            {
                foreach (var failure in validatorResults.Errors)
                {
                    validationError.Message      = failure.ErrorMessage;
                    validationError.PropertyName = failure.PropertyName;
                    return(0);
                }
            }

            return(Update(obj));
        }
예제 #4
0
        private void SimpanHeaderNotaMiniPOS()
        {
            IHeaderNotaMiniPosBll headerNotaBll = new HeaderNotaMiniPosBll();

            var index = 0;

            foreach (var item in _listOfTxtHeaderNotaMiniPOS)
            {
                var headerNota = new HeaderNotaMiniPos
                {
                    header_nota_id = item.Tag.ToString(),
                    keterangan     = item.Text
                };

                var result = headerNotaBll.Update(headerNota);
                if (result > 0)
                {
                    _pengaturanUmum.list_of_header_nota_mini_pos[index].header_nota_id = headerNota.header_nota_id;
                    _pengaturanUmum.list_of_header_nota_mini_pos[index].keterangan     = headerNota.keterangan;
                }

                index++;
            }
        }
예제 #5
0
 public int Delete(HeaderNotaMiniPos obj)
 {
     throw new NotImplementedException();
 }