示例#1
0
        public void DeleteConcreteTube(string code)
        {
            var concreteTube = new ConcreteTube()
            {
                Code = code
            };

            ConcreteTubeMethods.Instance.DeleteConcreteTube(concreteTube);
        }
示例#2
0
        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));
        }
示例#3
0
        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));
        }