Esempio n. 1
0
        private void grViewLSP_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e)
        {
            int            id  = Convert.ToInt32(grViewLSP.GetRowCellValue(grViewLSP.FocusedRowHandle, "ID"));
            List <SANPHAM> lst = spDAO.getListSPByLSP(id);

            foreach (SANPHAM s in lst)
            {
                s.ANH   = @"E:\Projects\DEPLOY IIS\QuanCafeAPI IIS" + s.ANH;
                s.image = ConvertImage(s.ANH);
                s.price = spDAO.getPrice(s.ID);
            }
            grCtrlSP.DataSource = lst;
            Hienthi();
        }
Esempio n. 2
0
 /// <summary>
 /// Set DataSources cho Combobox sản phẩm khi nhập hàng
 /// </summary>
 /// <param name="s"></param>
 /// <param name="e"></param>
 private void setCBBNhap_SP_Source(object s, EventArgs e)
 {
     cbBNhap_SP.DataSource    = spDAO.getListSPByLSP((int)cbBNhap_LSP.SelectedValue);
     cbBNhap_SP.DisplayMember = "KHOILUONG";
     cbBNhap_SP.ValueMember   = "ID";
 }