Esempio n. 1
0
        protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
        {
            string marca = this.GridView1.SelectedDataKey["MARCA"].ToString();

            string nume = this.GridView1.SelectedRow.Cells[1].Text.ToString();

            string card = this.GridView1.SelectedRow.Cells[5].Text.ToString();

            zkemkeeper.CZKEM aa = new zkemkeeper.CZKEM();
            Literal2.Text = "";

            if (aa.Connect_Net("10.10.13.10", 4370))
            {
                Literal2.Text = Literal2.Text + " " + "Conectat...";
                //aa.SetStrCardNumber("");
                if (aa.SetStrCardNumber(card))
                {
                    Literal2.Text = Literal2.Text + " " + "actualizat card :" + card;
                }
                else
                {
                    Literal2.Text = Literal2.Text + " " + "EROARE actualizare card " + card;
                }
                if (aa.SSR_SetUserInfo(1, marca, nume, "", 0, true))
                {
                    Literal2.Text = Literal2.Text + " " + "actualizat " + marca + " " + nume;
                }
                else
                {
                    Literal2.Text = Literal2.Text + " " + "EROARE actualizare " + marca + " " + nume;
                }
                aa.Disconnect();
            }
            else
            {
                Literal2.Text = "nu m-am putrut conecta la aparat";
            }
        }