public bool Insert(ActualPrice actualPrice) { int rs = 0; DbContext.GetConnection().Execute("delete from actual_price"); rs = DbContext.GetConnection().Insert(actualPrice); return(rs > 0 ? true : false); }
public bool Insert(ActualPrice actualPrice) { var uow = new UnitOfWork(DbContext); var rs = uow.ActualPriceRepository.Insert(actualPrice); return(rs); }
public override int GetHashCode() { var hashCode = 909073441; hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Name); hashCode = hashCode * -1521134295 + ActualPrice.GetHashCode(); hashCode = hashCode * -1521134295 + IsOpened.GetHashCode(); hashCode = hashCode * -1521134295 + ClosingTime.GetHashCode(); hashCode = hashCode * -1521134295 + EqualityComparer <string> .Default.GetHashCode(Description); hashCode = hashCode * -1521134295 + EqualityComparer <Guid> .Default.GetHashCode(CategoryId); hashCode = hashCode * -1521134295 + EqualityComparer <Guid> .Default.GetHashCode(AccountId); return(hashCode); }
private void FillActualPrice(ActualPrice actual) { ActualPrice = String.Format("U$ {0:0.##}", actual.UsdPrice); ActualDate = actual.FormatedDate.Date.ToString(AppResources.FormatedDate); }