public Expediente2(PostgresDataAccess.Expediente exp) { Ubicacion = ""; // rellenar :( InitializeComponent(); Datos = new PostgresDataAccess.DataAccess(); // rellenar combo ComunasCuerpo = Datos.ObtenerComunasCuerpo(); Comunas = Datos.ObtenerComunas(); comboComuna.Items.AddRange(Comunas.ToArray()); checkRM.Checked = true; //!!!!!!!!!!!!!!!!!comboServicio.SelectedItem = exp.Servicio; textClave.Text = Datos.ObtenerTipoLlamado(exp.Codigo_llamado); textClave.Tag = exp.Codigo_llamado; textHora.Text = exp.Hora.ToShortTimeString(); dtFecha.Value = exp.Fecha; textDireccion.Text = exp.Seis2; comboComuna.SelectedItem = exp.Comuna; textEsquina.Text = exp.Cero5; textPoblacion.Text = exp.Poblacion_villa; textBlock.Text = exp.Block; textCasa.Text = exp.Casa; textTelefono.Text = exp.Telefono; textQuienLlama.Text = exp.Quien_llama; comboCompañia.SelectedItem = exp.Compania; textDescripcion.Text = exp.Descripcion; edicion = true; EditExp = exp; btnIngresar.Text = "Actualizar"; }
private void SeleccionarPunto(int x, int y) { double px = 0, py = 0; MapWin.View.PixelToProj(x, y, ref px, ref py); direccion = new Direccion(); direccion.Ubicacion = new PointD(px, py); PostgresDataAccess.DataAccess da = new PostgresDataAccess.DataAccess(); direccion.Geoz = da.ObtenerGeoz(direccion.Ubicacion.Value.ToString()); // dibujar if (PlugData.DrDireccion.HasValue) { MapWin.View.Draw.ClearDrawing(PlugData.DrDireccion.Value); } PlugData.DrDireccion = MapWin.View.Draw.NewDrawing(MapWinGIS.tkDrawReferenceList.dlSpatiallyReferencedList); MapWin.View.Draw.DrawCircle(px, py, 20, Color.Red, true); // deshabilitar Botones[4].Pressed = false; MapWin.View.MapCursor = _prevCursor; MapWin.View.CursorMode = _prevMode; // generar expediente PlugData.Direccion = direccion; Forms.Expediente2 expediente2 = new Forms.Expediente2(); expediente2.ShowDialog(); }
public Expediente2() { Ubicacion = ""; InitializeComponent(); Datos = new PostgresDataAccess.DataAccess(); // rellenar combos ComunasCuerpo = Datos.ObtenerComunasCuerpo(); Comunas = Datos.ObtenerComunas(); comboComuna.Items.AddRange(ComunasCuerpo.ToArray()); // agregar datos desde geocodificacion textHora.Text = DateTime.Now.ToString("HH:mm:ss"); dtFecha.Value = DateTime.Now; textDireccion.Text = PlugData.Direccion.Calle1; textEsquina.Text = PlugData.Direccion.Calle2; if (PlugData.Direccion.Altura != 0) { textCasa.Text = PlugData.Direccion.Altura.ToString(); } comboComuna.SelectedItem = PlugData.Direccion.Comuna; // servicio btnClaves.Blink = true; int ar_txt = Datos.ObtenerArea(PlugData.Direccion.Ubicacion.ToString()); label15.Text = ar_txt.ToString() == "0" ? "" : ar_txt.ToString(); }
public Agenda() { InitializeComponent(); Regex r = new Regex(@"(\(.*\)|Exp)"); Datos = new PostgresDataAccess.DataAccess(); // llenar combobox List <PostgresDataAccess.Expediente> l = new List <PostgresDataAccess.Expediente>(); DataTable dt = Datos.ObtenerExpedientesActivos(); foreach (DataRow dr in dt.Rows) { PostgresDataAccess.Expediente exp = new PostgresDataAccess.Expediente(); exp.Id_expediente = (int)dr["id_expediente"]; exp.Seis2 = (string)dr["seis2"]; exp.Cero5 = (string)dr["cero5"]; exp.Ubicacion = new PointD((double)dr["puntoX"], (double)dr["puntoY"]); comboExpedientes.Items.Add(Datos.ObtenerClaveLlamado((int)dr["codigo_llamado"]) + " >> " + exp.Seis2 + " / " + exp.Cero5); l.Add(exp); } exps = l.ToArray(); FillCombos(); }
private void button1_Click(object sender, EventArgs e) { PostgresDataAccess.DataAccess access = new PostgresDataAccess.DataAccess(); if (access.claveCarro63(comboClave.Text, Coor1, Coor2, Calle1, Calle2) > 0) { MessageBox.Show("Coordenadas asignadas a " + comboClave.Text); this.DialogResult = DialogResult.OK; } }
public Esquinas(string calle) { InitializeComponent(); // cargar esquinas calle = Regex.Replace(calle, "^(AVDA )|^(CALLE )|^(PSJE )|^(PTE )", ""); label1.Text = string.Format(label1.Text, calle); Datos = new PostgresDataAccess.DataAccess(); List <string> esquinas = Datos.ObtenerEsquinas(calle, true, false, null); listEsquina.Items.AddRange(esquinas.ToArray()); }
public Claves() { InitializeComponent(); Datos = new PostgresDataAccess.DataAccess(); aClaves = Datos.ObtenerTipoLlamado(); foreach (KeyValuePair <string, int> k in aClaves) { listClaves.Items.Add(k.Key); } listSubclaves.ValueMember = "Key"; }
public PuntosInteres() { InitializeComponent(); // cargar y agregar Datos = new PostgresDataAccess.DataAccess(); Pi = Datos.ObtenerPuntosInteres(); int i = 0; foreach (PostgresDataAccess.PuntoInteres p in Pi) { RadioButton r = new RadioButton(); r.Name = r.Text = p.RadioText; r.Location = new Point(6, 19 + r.Size.Height * i++); r.CheckedChanged += new EventHandler(radioButton_CheckedChanged); groupTipo.Controls.Add(r); groupZoom.Location = new Point(groupZoom.Location.X, groupZoom.Location.Y + r.Size.Height + 1); btnMostrar.Location = new Point(btnMostrar.Location.X, btnMostrar.Location.Y + r.Size.Height + 1); this.Height += 10; } }
public Expediente2(string ubicacion) { string[] X_e_Y = ubicacion.Split(' '); string strX_truncate = X_e_Y[0].Substring(0, 6); string strY_truncate = X_e_Y[1].Substring(0, 7); ubicacion = strX_truncate + " " + strY_truncate; InitializeComponent(); Ubicacion = ubicacion; Datos = new PostgresDataAccess.DataAccess(); // rellenar combos ComunasCuerpo = Datos.ObtenerComunasCuerpo(); Comunas = Datos.ObtenerComunas(); comboComuna.Items.AddRange(ComunasCuerpo.ToArray()); // agregar datos desde geocodificacion string hora = DateTime.Now.ToString("HH:mm:ss").ToString(); textHora.Text = hora; dtFecha.Value = DateTime.Now; int ar_txt = Datos.ObtenerArea(Ubicacion); //label15.Text = ar_txt.ToString() == "0" ? "" : ar_txt.ToString(); label15.Text = ar_txt.ToString() == "" ? "" : ar_txt.ToString(); /*textDireccion.Text = PlugData.Direccion.Calle1; * textEsquina.Text = PlugData.Direccion.Calle2;*/ /*if (PlugData.Direccion.Altura != 0) * textCasa.Text = PlugData.Direccion.Altura.ToString(); * comboComuna.SelectedItem = PlugData.Direccion.Comuna; * // servicio * btnClaves.Blink = true; * int ar_txt = Datos.ObtenerArea(PlugData.Direccion.Ubicacion.ToString()); * MessageBox.Show(PlugData.Direccion.Ubicacion.ToString()); * label15.Text = ar_txt.ToString() == "0" ? "" : ar_txt.ToString();*/ }
public AgendaSolicitud() { InitializeComponent(); Datos = new PostgresDataAccess.DataAccess(); }
public ListadoGrifos() { InitializeComponent(); Datos = new PostgresDataAccess.DataAccess(); }
public ListadoExpedientes() { InitializeComponent(); Datos = new PostgresDataAccess.DataAccess(); }
public AgendaEmpresa(int id_subcat) { InitializeComponent(); this.id_subcat = id_subcat; Datos = new PostgresDataAccess.DataAccess(); }
public AgendaCategoria(int id_cat) { InitializeComponent(); this.id_cat = id_cat; Datos = new PostgresDataAccess.DataAccess(); }