Ejemplo n.º 1
0
        public static DbAck Update(TienKhamDTO TienKham)
        {
            DbAck result = DbAck.Unknown;

            result = TienKhamDAO.Update(TienKham);


            return(result);
        }
Ejemplo n.º 2
0
        public static DbAck Update(TienKhamDTO TienKham)
        {
            string sql = "update TienKham set tien_kham = @Tien";

            Dictionary <string, object> parameter = new Dictionary <string, object>();

            parameter.Add("@Tien", TienKham.Tien);



            DbAck result = DataProvider.ExecNonQuery(sql, parameter);

            return(result);
        }
Ejemplo n.º 3
0
        private void button2_Click(object sender, EventArgs e)
        {
            TienKhamDTO TienKham = new TienKhamDTO();

            TienKham.Tien = int.Parse(txtTienKham.Text);
            DbAck ack = TienKhamBUS.Update(TienKham);

            if (ack == DbAck.Ok)
            {
                MessageBox.Show("Thay đổi thành công", "Thông báo");
            }
            else
            {
                if (ack == DbAck.Unknown)
                {
                    MessageBox.Show("Lỗi không xác định", "Thông báo");
                }
                else
                {
                }
            }
            txtTienKham.Text = TienKham.Tien.ToString();
        }