Example #1
0
        public IList <AlarmFieldInfo> GetAllAlarmFields()
        {
            DataTable tb = getAllAlarmFields();

            List <AlarmFieldInfo> lst = new List <AlarmFieldInfo>();

            if (tb != null && tb.Rows.Count > 0)
            {
                foreach (DataRow row in tb.Rows)
                {
                    AlarmFieldInfo info = new AlarmFieldInfo();
                    info.AlarmFieldId     = int.Parse(row[0].ToString());
                    info.FieldName        = row[1].ToString();
                    info.FieldDescription = row[2].ToString();

                    lst.Add(info);
                }
            }
            return(lst);
        }
Example #2
0
 public static AlarmFieldModel ToModel(this AlarmFieldInfo entity)
 {
     return(Mapper.Map <AlarmFieldInfo, AlarmFieldModel>(entity));
 }