예제 #1
0
        private void save_bail_Click(object sender, RoutedEventArgs e)
        {
            bail bail = new bail();

            string identifier = id.Text;

            string[] name = new string[2] {
                lastname.Text, firstname.Text
            };
            foreach (var names in name)
            {
                string val  = name[0];
                string val1 = name[1];
                bail.inmatename = val1 + " " + val;
            }
            bail.inmatenum  = identifier;
            bail.offense    = offense1.Text.ToString();
            bail.cases      = cbb.Text.ToString();
            bail.datebailed = datebailed.DisplayDate.ToString("yyyy-MM-dd");
            bail.bond       = bond.Text.ToString();
            bail.court      = court.Text.ToString();
            bail.approved   = approved.Text.ToString();
            con.Open();

            SqlCommand command = con.CreateCommand();

            command.CommandType = CommandType.Text;
            command.CommandText = "update prisoner set jailstatus = 'realeased' where id = '" + id.Text + "'";
            command.ExecuteNonQuery();
            con.Close();
            bail.bail_add();
            this.Close();

            bailinfo bi = new bailinfo();

            bi.Show();
            this.Close();
        }
예제 #2
0
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            bailinfo bail = new bailinfo();

            bail.Show();
        }