コード例 #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            if (ID != 0)
            {
                String sql = "update Clients set check_out='Y' where national_id='" + nationalIdtext.Text + "' ";
                conn.SQLUPDATE(sql, false);

                sql = "select unit_id from ClientsUnits where client_id=" + ID + " and RecoredState='N'";
                conn.SQLCODE(sql, false);
                if (conn.myReader.Read())
                {
                    unitIdToBack = int.Parse(conn.myReader[0].ToString());
                }

                sql = "update ClientsUnits set RecoredState='C' where client_id=" + ID + " and RecoredState='N'";
                conn.SQLUPDATE(sql, false);

                sql = "update units set available_units=available_units+1 where ID=" + unitIdToBack + "";
                conn.SQLUPDATE(sql, true);


                AddSheeq addObj = new AddSheeq(ID);
                addObj.ShowDialog();
                this.Close();
            }
        }
コード例 #2
0
        private void addSheeq_Click(object sender, EventArgs e)
        {
            AddSheeq aS = new AddSheeq(-1);

            aS.ShowDialog();
        }