Esempio n. 1
0
        public void LoadId(string Contact, string Id = null)
        {
            int aux;

            textBox1.Text     = Contact;
            textBox1.ReadOnly = true;
            if (Contact == "NMB" && Id == null)
            {
                aux = _LogicLayer.GetMaxID();
                aux++;
                textBox2.Text     = aux.ToString();
                textBox2.ReadOnly = true;
            }
            else if (Contact == "NMB" && Id != null)
            {
                textBox2.Text      = Id;
                textBox2.ReadOnly  = true;
                PrimeraVez.Checked = true;
            }
            else if (Contact == "Cuidador")
            {
                aux = _LogicLayer.GetMaxIDCuidador();
                aux++;
                textBox2.Text     = aux.ToString();
                textBox2.ReadOnly = true;
            }
            else if (Contact == "MMB")
            {
                aux = _LogicLayer.GetMaxIDMMB();
                aux++;
                textBox2.Text     = aux.ToString();
                textBox2.ReadOnly = true;
            }
        }