예제 #1
0
 /// <summary>
 /// Create a new remag_cbo object.
 /// </summary>
 /// <param name="cbo_id">Initial value of the cbo_id property.</param>
 /// <param name="descricao">Initial value of the descricao property.</param>
 /// <param name="cbo">Initial value of the cbo property.</param>
 public static remag_cbo Createremag_cbo(global::System.Int32 cbo_id, global::System.String descricao, global::System.Int32 cbo)
 {
     remag_cbo remag_cbo = new remag_cbo();
     remag_cbo.cbo_id = cbo_id;
     remag_cbo.descricao = descricao;
     remag_cbo.cbo = cbo;
     return remag_cbo;
 }
예제 #2
0
 private void ImportarCBO(DataEntities dataContext, List<string> linhas)
 {
     linhas = linhas.Where(l => l.StartsWith("CBO|")).ToList();
     int i = 0;
     foreach (string linha in linhas)
     {
         string[] fields = linha.Split('|');
         remag_cbo cbo = new remag_cbo();
         cbo.descricao = fields[2];
         cbo.cbo = Convert.ToInt32(fields[1]);
         dataContext.AddToremag_cbo(cbo);
         backgroundWorker1.ReportProgress(i++);
     }
 }
예제 #3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the remag_cbo EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToremag_cbo(remag_cbo remag_cbo)
 {
     base.AddObject("remag_cbo", remag_cbo);
 }
예제 #4
0
 private remag_cbo GetCBO(DataEntities dataContext,int cbo)
 {
     remag_cbo cboDB = dataContext.remag_cbo.FirstOrDefault(c => c.cbo == cbo);
     if (cbo == null)
     {
         cboDB = new remag_cbo();
         cboDB.cbo = cbo;
         cboDB.descricao = "CBO Importação RAIS";
         dataContext.AddToremag_cbo(cboDB);
     }
     return cboDB;
 }