private void gvKMChiTiet_RowCellStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowCellStyleEventArgs e) { if (e.RowHandle < 0) { return; } BangGiaADKhuyenMaiChiTietInfor kmct = (BangGiaADKhuyenMaiChiTietInfor)gvKMChiTiet.GetRow(e.RowHandle); if (kmct != null && (kmct.NoKhuyenMai > 0 || !String.IsNullOrEmpty(kmct.GhiChu))) { if (e.Column.FieldName.Equals("NoKhuyenMai") && kmct.NoKhuyenMai > 0) { e.Appearance.BackColor = kmct.HetTonDungKM == 0 ? tsslNoKhuyenMai.BackColor : tsslTrangThai.BackColor; e.Appearance.ForeColor = Color.DarkBlue; e.Appearance.Font = new Font("Tahoma", 9, FontStyle.Bold); } if (e.Column.FieldName.Equals("GhiChu") && !String.IsNullOrEmpty(kmct.GhiChu)) { e.Appearance.BackColor = tsslChuaCoGia.BackColor; e.Appearance.ForeColor = Color.DarkBlue; e.Appearance.Font = new Font("Tahoma", 9, FontStyle.Bold); } } }
public int InsertKhuyenMaiChiTiet(BangGiaADKhuyenMaiChiTietInfor kmct) { ExecuteCommand(Declare.StoreProcedureNamespace.spBangGiaKMChiTietInsert, kmct.IdChiTiet, kmct.IdKhuyenMai, kmct.MaHangKM, kmct.SoLuong, kmct.SoTienKM, kmct.GhiChu, kmct.InKemHD, kmct.HetTonDungKM, kmct.TyLeKM, kmct.LoaiHangKM, kmct.MaHangSX, kmct.SuDung, kmct.SoTienYeuCau, kmct.TyLeThanhToan, kmct.DongBoWebSite); return(Common.IntValue(Parameters["p_IdChiTiet"].Value)); }
private void gvKMChiTiet_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e) { BangGiaADKhuyenMaiChiTietInfor km = (BangGiaADKhuyenMaiChiTietInfor)gvKMChiTiet.GetRow(e.RowHandle); if (km != null && km.ChinhSachKhuyenMai != null && km.ChinhSachKhuyenMai.Contains("(mặc định)")) { e.Appearance.BackColor = tsslChinhSachMacDinh.BackColor; } }
private bool IsChietKhau(int row) { BangGiaADKhuyenMaiChiTietInfor kmct = (BangGiaADKhuyenMaiChiTietInfor)gvSanPham.GetRow(gvSanPham.FocusedRowHandle); if (kmct != null) { return(Common.Int2Bool(kmct.ChietKhau)); } return(false); }
public int InsertKhuyenMaiChiTiet(BangGiaADKhuyenMaiChiTietInfor kmct) { return KhuyenMaiDAO.Instance.InsertKhuyenMaiChiTiet(kmct); }
public void UpdateKhuyenMaiChiTiet(BangGiaADKhuyenMaiChiTietInfor kmct) { KhuyenMaiDAO.Instance.UpdateKhuyenMaiChiTiet(kmct); }
public void UpdateKhuyenMaiChiTiet(BangGiaADKhuyenMaiChiTietInfor kmct) { ExecuteCommand(Declare.StoreProcedureNamespace.spBangGiaKMChiTietUpdate, kmct.IdChiTiet, kmct.IdKhuyenMai, kmct.MaHangKM, kmct.SoLuong, kmct.SoTienKM, kmct.GhiChu, kmct.InKemHD, kmct.HetTonDungKM, kmct.TyLeKM, kmct.LoaiHangKM, kmct.MaHangSX, kmct.SuDung, kmct.SoTienYeuCau, kmct.TyLeThanhToan, kmct.DongBoWebSite); }