コード例 #1
0
 private void txtMadichvu_TextChanged(object sender, EventArgs e)
 {
     try
     {
         GiaDichVu g = gdv.GetLast(int.Parse(txtMadichvu.Text), "GiaDichVuMaDichVu");
         txtGia.Text = g.GiaTienDichVu.ToString();
     }
     catch (Exception)
     {
         throw;
     }
 }
コード例 #2
0
 private void txtMathuoc_TextChanged(object sender, EventArgs e)
 {
     try
     {
         GiaThuoc g = gt.GetLast(int.Parse(txtMathuoc.Text), "GiaThuocMaThuoc");
         txtGia.Text = g.GiaXuat.ToString();
     }
     catch (Exception)
     {
         XtraMessageBox.Show("Chưa có thông tin giá thuốc");
     }
 }
コード例 #3
0
        private void txtMathuoc_EditValueChanged(object sender, EventArgs e)
        {
            GiaThuoc g = new GiaThuoc();

            if (txtMathuoc.Text != "")
            {
                g = gt.GetLast(txtMathuoc.Text, "GiaThuocMaThuoc");
            }
            if (g != null)
            {
                Thuoc t = th.SelectByID(int.Parse(txtMathuoc.Text))[0];
                txtMagiathuoc.Text = g.MaGiaThuoc.ToString();
                txtMathuoc.Text    = g.MaThuoc.ToString();
                txtGianhap.Text    = g.GiaNhap.ToString();
                txtGiaxuat.Text    = g.GiaXuat.ToString();
                dtNgaycapnhat.Text = g.NgayCapNhat.ToShortDateString();
                txtTenthuoc.Text   = t.TenThuoc;
            }
            LoadGiaThuoc();
        }