public int Update(LabelNota obj) { var result = 0; using (IDapperContext context = new DapperContext()) { _unitOfWork = new UnitOfWork(context, _log); result = _unitOfWork.LabelNotaRepository.Update(obj); } return(result); }
public int Update(LabelNota obj) { var result = 0; try { result = _context.db.Update <LabelNota>(obj) ? 1 : 0; } catch (Exception ex) { _log.Error("Error:", ex); } return(result); }
public int Update(LabelNota 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)); }
private void SimpanLabelNota() { ILabelNotaBll labelNotaBll = new LabelNotaBll(); var index = 0; foreach (var item in _listOfTxtLabelNota) { var labelNota = new LabelNota { label_nota_id = item.Tag.ToString(), keterangan = item.Text }; var result = labelNotaBll.Update(labelNota); if (result > 0) { _pengaturanUmum.list_of_label_nota[index].label_nota_id = labelNota.label_nota_id; _pengaturanUmum.list_of_label_nota[index].keterangan = labelNota.keterangan; } index++; } }
public int Delete(LabelNota obj) { throw new NotImplementedException(); }