Пример #1
0
        private bool GetQualityCotrols(FileInfo file, string attribute)
        {
            try
            {
                var excel = new LinqToExcel.ExcelQueryFactory(file.ToString());

                var columnsNames = excel.GetColumnNames(excel.GetWorksheetNames().ToList().First()).ToList();
                foreach (var item in excel.GetWorksheetNames().ToList())
                {
                    foreach (LinqToExcel.Row r in excel.Worksheet(item).ToList())
                    {
                        var enumerator = r.GetEnumerator();

                        while (enumerator.MoveNext())
                        {
                            if (string.IsNullOrEmpty(enumerator.Current.Value.ToString()))
                            {
                                enumerator.MoveNext();
                                continue;
                            }
                            var coded = enumerator.Current.Value.ToString();
                            GetIdRemarkLabel remarkId = GetIdRemarkLabelBL.GetIdRemarkLabel(columnsNames[r.IndexOf(enumerator.Current)]);
                            enumerator.MoveNext();
                            SetClientsCatalogsNextelBL.SetClientsCatalogsNextel(attribute, remarkId.IDRemarkLabel, coded, enumerator.Current.Value.ToString());
                        }
                    }
                }
                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }
 /// <summary>
 /// Función que inserta una nuevo valor(descripción)
 /// al catalogo de Nextel
 /// </summary>
 /// <returns></returns>
 private void insertvalue(string Corporative, string LabelRemark, string ValueToInsert, string DescToInsert)
 {
     List <SetClientsCatalogsNextel> SetClientsCatalogsNextel = SetClientsCatalogsNextelBL.SetClientsCatalogsNextel(Corporative, LabelRemark, ValueToInsert, DescToInsert);
 }