public bool CheckForProductExists(int ProductId, int SaleDispatchHeaderId) { SaleDispatchLine temp = (from p in db.SaleDispatchLine where p.SaleDispatchHeaderId == SaleDispatchHeaderId select p).FirstOrDefault(); if (temp != null) { return(true); } else { return(false); } }
public void Update(SaleDispatchLine s) { s.ObjectState = ObjectState.Modified; _unitOfWork.Repository <SaleDispatchLine>().Update(s); }
public void Delete(SaleDispatchLine s) { _unitOfWork.Repository <SaleDispatchLine>().Delete(s); }
public SaleDispatchLine Create(SaleDispatchLine S) { S.ObjectState = ObjectState.Added; _unitOfWork.Repository <SaleDispatchLine>().Insert(S); return(S); }