Example #1
0
 private void btHuy_Click(object sender, EventArgs e)
 {
     gbDetail.Show();
     gbEdit.Hide();
     btThemAnh.Hide();
     pbAnhTaiSan.Image = TaiSan.getImage();
 }
Example #2
0
        void getData()
        {
            string query = @"SELECT ma_tai_san, ten_tai_san, so_luong, tri_gia, mo_ta, img
                        FROM TaiSan
                        WHERE ma_tai_san = " + Id + "";

            DB.conn.Open();
            SqlCommand    cmd = new SqlCommand(query, DB.conn);
            SqlDataReader rd  = cmd.ExecuteReader();

            while (rd.Read())
            {
                TaiSan = new CTaiSan(rd[0].ToString(), rd[1].ToString(), rd[2].ToString(), rd[3].ToString(), rd[4].ToString(), (byte[])rd[5]);
            }
            DB.conn.Close();

            lbName.Text        = TaiSan.Name;
            lbCount.Text       = TaiSan.Count;
            lbValue.Text       = Commom.getMoneyStr(TaiSan.Value);
            lbDescription.Text = TaiSan.Description;
            pbAnhTaiSan.Image  = TaiSan.getImage();
        }