Exemple #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            string sql = "insert into addaccount(户主,账号,开户日期,操作前金额,操作,操作时间,余额,是否使用) values('" + textBox1.Text + "','" + textBox3.Text + "','" + dateTimePicker1.Value + "','" + textBox2.Text + "','" + comboBox3.Text + "','" + dateTimePicker2.Value + "','" + textBox4.Text + "','" + xb + "')";

            DBOperation.exesql(sql);
            MessageBox.Show("添加成功!", "提示");
        }
Exemple #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            string sql = "insert into income(借出金额,借出时间,借款人,收款日期,还款人,是否回收,说明) values('" + textBox1.Text + "','" + dateTimePicker1.Value + "','" + textBox2.Text + "','" + dateTimePicker1.Value + "','" + textBox3.Text + "','" + xb + "','" + textBox4.Text + "')";

            DBOperation.exesql(sql);
            MessageBox.Show("添加成功!", "提示");
        }
Exemple #3
0
 private void button4_Click(object sender, EventArgs e)
 {
     if (xb.Equals("借出信息"))
     {
         DataRowView row = dataGridView1.CurrentRow.DataBoundItem as DataRowView;
         if (row["序号"] == null)
         {
             return;                   //可以进行快速监视
         }
         string bd  = Convert.ToString(row["序号"]);
         string str = "delete from income where 序号 = " + bd + "";
         DBOperation.exesql(str);
         MessageBox.Show("删除成功!", "提示");
     }
     else
     {
         DataRowView row = dataGridView1.CurrentRow.DataBoundItem as DataRowView;
         if (row["序号"] == null)
         {
             return;                   //可以进行快速监视
         }
         string bd  = Convert.ToString(row["序号"]);
         string str = "delete from incomein where 序号 = " + bd + "";
         DBOperation.exesql(str);
         MessageBox.Show("删除成功!", "提示");
     }
 }
Exemple #4
0
        private void button1_Click(object sender, EventArgs e)
        {
            //户主='" + textBox1.Text + "',
            string sql = "update addaccount set 户主='" + textBox1.Text + "',账号='" + textBox3.Text + "',开户日期='" + dateTimePicker1.Value + "',操作前金额='" + textBox2.Text + "',操作='" + comboBox3.Text + "',操作时间='" + dateTimePicker2.Value + "',余额='" + textBox4.Text + "',是否使用='" + xb + "'where 序号 = '" + AccountManage.a5 + "'";

            DBOperation.exesql(sql);
            MessageBox.Show("修改成功!", "提示");
        }
Exemple #5
0
 private void button1_Click(object sender, EventArgs e)
 {
     check();
     if (bx == 0)
     {
         string sql = "update src set password='******' where id='" + ps + "'";
         DBOperation.exesql(sql);
         MessageBox.Show("修改成功!", "提示");
         this.Close();
     }
 }
Exemple #6
0
        private void toolStripButton2_Click(object sender, EventArgs e)
        {
            //string sql="delete * from addaccount where 序号='"++"'
            DataRowView row = dataGridView1.CurrentRow.DataBoundItem as DataRowView;

            if (row["序号"] == null)
            {
                return;                   //可以进行快速监视
            }
            string bd  = Convert.ToString(row["序号"]);
            string str = "delete from addaccount where 序号 = " + bd + "";

            DBOperation.exesql(str);
            MessageBox.Show("删除成功!", "提示");
        }