Exemple #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (run_mesa)
     {
         if (mesa(this))
         {
             CallForm callForm = new CallForm();
             callForm.LlamarForm(ref runFormulario, ref pFormulario);
         }
     }
 }
Exemple #2
0
        public void Cargar_MxUb(string pCondicion = null)
        {
            DataTable dt = new DataTable();

            dt.ejecuta($"select * from mesa {pCondicion}");

            List <btnMesa> lbtn = CallForm.Cargar_MesaxUbicacion(ref PanelPrincipal);

            foreach (btnMesa item in lbtn)
            {
                contenedor.Controls.Add(item);
                CallForm.EstadosColor(item);
            }
        }
Exemple #3
0
        //public bool ubicacion(btnUbicacion btnUbicacion)
        //{

        //    string vSql = $"SELECT id_ubicacion FROM ubicacion where  id_ubicacion = " + btnUbicacion.Tag.ToString();
        //    DataSet dt = new DataSet();
        //    dt.ejecuta(vSql);
        //    bool correcto = dt.ejecuta(vSql);
        //    id_ubicacion = Convert.ToInt32(dt.Tables[0].Rows[0]["id_ubicacion"].ToString());


        //    if (utilidades.DsTieneDatos(dt))
        //    {
        //        MessageBox.Show("Testa" + id_ubicacion);
        //        return true;
        //    }
        //    return false;
        //}
        private void button1_Click(object sender, EventArgs e)
        {
            string pcondicion = string.Empty;

            if (!string.IsNullOrEmpty(this.Tag.ToString()))
            {
                pcondicion = $"where id_ubicacion={this.Tag}";
            }
            List <btnMesa> lbtn = CallForm.Cargar_MesaxUbicacion(ref PanelPrincipal, pcondicion);

            if (contenedor != null)
            {
                contenedor.Controls.Clear();
            }
            foreach (btnMesa item in lbtn)
            {
                contenedor.Controls.Add(item);
                CallForm.EstadosColor(item);
            }
        }