Exemple #1
0
 public Job(int jobno, int town, string sec, string blk, string lot)
 {
     this.jobNo = jobno;
     this.town  = (Muni)town;
     this.sec   = sec;
     this.blk   = blk;
     this.lot   = lot;
 }
Exemple #2
0
 public Job(int jobno, int town, string sec, string blk, string lot, string client, bool active = false, bool r = false, bool f = false, bool o = false, bool i = false, int est = 0, int rec1 = 0, int rec2 = 0, int tot = 0)
 {
     this.jobNo  = jobno;
     this.town   = (Muni)town;
     this.sec    = sec;
     this.blk    = blk;
     this.lot    = lot;
     this.client = client;
     this.r      = r;
     this.f      = f;
     this.o      = o;
     this.i      = i;
     this.est    = est;
     this.rec1   = rec1;
     this.rec2   = rec2;
     this.total  = tot;
 }
        private void UpDateDataGridMunicipio()
        {
            var paises     = client.GetPaises();
            var provencias = client.GetProvencias();
            var municipios = client.GetMunicipios();
            var muniPios   = new List <Muni>();

            foreach (var m in municipios)
            {
                int idp = (from c in provencias
                           where c.idprovencia == m.Provencias_idprovencia select c.Pais_idpais).ElementAt(0);
                var muni = new Muni
                {
                    Nombre    = m.nombre,
                    Provencia = (from c in provencias where c.idprovencia == m.Provencias_idprovencia
                                 select c.nombre).ElementAt(0),
                    Pais         = (from c in paises where c.idpais == idp select c.nombre).ElementAt(0),
                    FechaAgregar = m.fechaCreacion.ToString(),
                    Estado       = m.estado
                };
                muniPios.Add(muni);
            }
            dataGridViewMunicipio.DataSource = muniPios;
        }