/// <summary> /// Deprecated Method for adding a new object to the remag_admissao_numerica EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToremag_admissao_numerica(remag_admissao_numerica remag_admissao_numerica) { base.AddObject("remag_admissao_numerica", remag_admissao_numerica); }
/// <summary> /// Create a new remag_admissao_numerica object. /// </summary> /// <param name="admissao_numerica_id">Initial value of the admissao_numerica_id property.</param> /// <param name="descricao">Initial value of the descricao property.</param> /// <param name="codigo">Initial value of the codigo property.</param> public static remag_admissao_numerica Createremag_admissao_numerica(global::System.Int32 admissao_numerica_id, global::System.String descricao, global::System.Int32 codigo) { remag_admissao_numerica remag_admissao_numerica = new remag_admissao_numerica(); remag_admissao_numerica.admissao_numerica_id = admissao_numerica_id; remag_admissao_numerica.descricao = descricao; remag_admissao_numerica.codigo = codigo; return remag_admissao_numerica; }
private void ImportarAdmissaoNumerica(DataEntities dataContext, List<string> linhas) { linhas = linhas.Where(l => l.StartsWith("AdmissaoNumerica|")).ToList(); int i = 0; foreach (string linha in linhas) { string[] fields = linha.Split('|'); remag_admissao_numerica admissao = new remag_admissao_numerica(); admissao.descricao = fields[1]; admissao.codigo = Convert.ToInt32(fields[2]); dataContext.AddToremag_admissao_numerica(admissao); backgroundWorker1.ReportProgress(i++); } }