Esempio n. 1
0
        public static T_Belt ConvertToDB(BeltClass belt)
        {
            T_Belt t_belt = new T_Belt();

            t_belt.Name           = belt.Name;
            t_belt.id             = belt.id;
            t_belt.Guid           = belt.Guid;
            t_belt.PulleyDiameter = belt.PulleyDiameter;
            t_belt.BeltLength     = belt.BeltLength;

            return(t_belt);
        }
Esempio n. 2
0
        public static BeltClass ConvertFromDB(T_Belt t_belt)
        {
            BeltClass belt = new BeltClass();

            belt.Name           = t_belt.Name;
            belt.id             = t_belt.id;
            belt.Guid           = t_belt.Guid ?? new Guid();
            belt.PulleyDiameter = t_belt.PulleyDiameter ?? 0;
            belt.BeltLength     = t_belt.BeltLength ?? 0;

            return(belt);
        }