public void DeleteConcreteTube(string code) { var concreteTube = new ConcreteTube() { Code = code }; ConcreteTubeMethods.Instance.DeleteConcreteTube(concreteTube); }
public string AddConcreteTube(DtoConcreteTube dtoConcreteTube) { var concreteTube = new ConcreteTube() { Order = new Order { Id = OrderMethods.Instance.GetOrderByNumber(dtoConcreteTube.Order.Number).Id }, Tube = new Tube() { Id = TubeMethods.Instance.GetTubeByCode(dtoConcreteTube.Tube.Code).Id }, ReceivedDt = dtoConcreteTube.ReceivedDt }; return(ConcreteTubeMethods.Instance.InsertConcreteTube(concreteTube)); }
public bool EditConcreteTube(DtoConcreteTube dtoConcreteTube) { var concreteTube = new ConcreteTube() { Id = ConcreteTubeMethods.Instance.GetConcreteTubeByCode(dtoConcreteTube.Code).Id, Code = dtoConcreteTube.Code, Tube = new Tube() { Id = TubeMethods.Instance.GetTubeByCode(dtoConcreteTube.Tube.Code).Id }, Order = new Order() { Id = ConcreteTubeMethods.Instance.GetConcreteTubeByCode(dtoConcreteTube.Code).Order.Id }, ReceivedDt = dtoConcreteTube.ReceivedDt, }; return(ConcreteTubeMethods.Instance.UpdateConcreteTube(concreteTube)); }