Beispiel #1
0
        public static T_CoefArea InsertarCoefArea(int i)
        {
            var _worksheet = ImportarExcel.GetWorkSheetByName("BaseDatos");

            var _value = _worksheet.GetSingleCellValue(i, 7);

            using (var db = new DB_PLANTILLA())
            {
                T_CoefArea _coef = new T_CoefArea()
                {
                    Value = _value
                };

                var _record = db.GetSingleRecord <T_CoefArea>(x => x.Value == _coef.Value);

                if (_record == null)
                {
                    db.AddElemento(_coef.GetType(), _coef);
                }
                else
                {
                    _coef = _record;
                }

                return(_coef);
            }
        }
Beispiel #2
0
        public static CoefArea ToProject(this T_CoefArea t_coefArea)
        {
            CoefArea _coefArea = new CoefArea()
            {
                Value = t_coefArea.Value
            };

            return(_coefArea);
        }