Exemplo n.º 1
0
 public bool UpdateConcreteTube(ConcreteTube tube)
 {
     var result = UpdateEntity<ConcreteTube>(tube);
     if (result)
     {
         log.Info(string.Format("Concrete tube {0} saved", tube.Code));
         return true;
     }
     else
     {
         return false;
     }
 }
Exemplo n.º 2
0
 public string InsertConcreteTube(ConcreteTube tube)
 {
     tube.Code = GenerateConcreteTubeNumber();
     var result = InsertEntity<ConcreteTube>(tube);
     if (result)
     {
         log.Info(string.Format("Concrete tube {0} saved", tube.Code));
         return tube.Code;
     }
     else
     {
         return string.Empty;
     }
 }
Exemplo n.º 3
0
        public bool UpdateConcreteTube(ConcreteTube tube)
        {
            var result = UpdateEntity <ConcreteTube>(tube);

            if (result)
            {
                log.Info(string.Format("Concrete tube {0} saved", tube.Code));
                return(true);
            }
            else
            {
                return(false);
            }
        }
Exemplo n.º 4
0
 public bool DeleteConcreteTube(ConcreteTube tube)
 {
     tube.Id = ConcreteTubeMethods.Instance.GetConcreteTubeByCode(tube.Code).Id;
     var result = DeleteEntity<ConcreteTube>(tube);
     if (result)
     {
         log.Info(string.Format("Concrete tube {0} deleted", tube.Code));
         return true;
     }
     else
     {
         return false;
     }
 }
Exemplo n.º 5
0
        public bool DeleteConcreteTube(ConcreteTube tube)
        {
            tube.Id = ConcreteTubeMethods.Instance.GetConcreteTubeByCode(tube.Code).Id;
            var result = DeleteEntity <ConcreteTube>(tube);

            if (result)
            {
                log.Info(string.Format("Concrete tube {0} deleted", tube.Code));
                return(true);
            }
            else
            {
                return(false);
            }
        }
Exemplo n.º 6
0
        public string InsertConcreteTube(ConcreteTube tube)
        {
            tube.Code = GenerateConcreteTubeNumber();
            var result = InsertEntity <ConcreteTube>(tube);

            if (result)
            {
                log.Info(string.Format("Concrete tube {0} saved", tube.Code));
                return(tube.Code);
            }
            else
            {
                return(string.Empty);
            }
        }
Exemplo n.º 7
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);
 }
Exemplo n.º 8
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);
 }
Exemplo n.º 9
0
 public void DeleteConcreteTube(string code)
 {
     var concreteTube = new ConcreteTube()
     {
         Code = code
     };
     ConcreteTubeMethods.Instance.DeleteConcreteTube(concreteTube);
 }