private void btnThayDoiGiaDV_Click(object sender, EventArgs e) { float giamoi; float.TryParse(txbGiaMoi.Text, out giamoi); if (txbmk.Text == "") { MessageBox.Show("Lỗi", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } if (giamoi != 0) { if (XuLyDAL.ktKhopMK(this.Text, txbmk.Text)) { DichVuDAL.thayDoiGiaDV(giamoi); MessageBox.Show("Thay đổi giá dịch vụ thành công !", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information); txbGiaMoi.Text = ""; txbmk.Text = ""; } else { MessageBox.Show("Mật khẩu không đúng !", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information); } } else { MessageBox.Show("Lỗi", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
public double GetTotalOfServiceListBLL(string contractId, int quantityClient) { DichVuDAL dal = new DichVuDAL(db); if (!contractId.Equals("")) { return(dal.GetTotalOfServiceListDAL(contractId)); } return(0.0); }
public bool CapNhat(DichVu item) { DichVuDAL dal = new DichVuDAL(db); if (item != null) { return(dal.CapNhat(item)); } else { return(false); } }
public bool ThemDichVu(DichVu dv) { DichVuDAL dal = new DichVuDAL(); if (TimDVTheoMa(dv.MaDichVu) == null) { return(dal.ThemDV(dv)); } else { return(false); } }
private void frmKhachHang_Load(object sender, EventArgs e) { TaiKhoan tk = TaiKhoanDAL.layTaiKhoan(this.Text); txbGiaDV.Text = DichVuDAL.layGiaDV().ToString() + " đồng/h"; TimeSpan tongTG = LayTimeSpan(tk.TongTG.Value); TimeSpan tgConLai = LayTimeSpan(tk.TGconLai.Value); txbTGconLai.Text = XuLyDAL.chuyenTimeSpanVeString(tgConLai); txbTGsuDung.Text = "00:00:00"; txbTongTG.Text = XuLyDAL.chuyenTimeSpanVeString(tongTG); }
public bool Xoa(DichVu item) { DichVuDAL dal = new DichVuDAL(db); try { if (item != null) { return(dal.Xoa(item)); } else { return(false); } } catch (Exception) { throw; } }
public DichVu TimKiemTheoMa(string id) { DichVuDAL dal = new DichVuDAL(db); try { if (!string.IsNullOrEmpty(id)) { return(dal.TimKiemTheoMa(id)); } else { return(null); } } catch (Exception) { throw; } }
public bool ThemMoi(DichVu item) { DichVuDAL dal = new DichVuDAL(db); try { if (item != null) { return(dal.ThemMoi(item)); } else { return(false); } } catch (Exception ex) { throw; } }
public DichVu GetServiceById(string id) { DichVuDAL dal = new DichVuDAL(db); return(dal.GetServiceById(id)); }
/// <summary> /// get all conference services to show in sevice list when reserve /// </summary> /// <returns></returns> public IEnumerable <DichVu> GetConferenceServices() { DichVuDAL dal = new DichVuDAL(db); return(dal.GetConferenceServices()); }
/// <summary> /// get all wedding services to show in sevice list when reserve /// </summary> /// <returns></returns> public IEnumerable <DichVu> GetWeddingServices() { DichVuDAL dal = new DichVuDAL(db); return(dal.GetWeddingServices()); }
public List <string> LayDSTenDV() { DichVuDAL dal = new DichVuDAL(); return(dal.LayDSTenDV()); }
public List <DichVu> DSDichVu() { DichVuDAL dal = new DichVuDAL(); return(dal.DSDichVu()); }
public DataTable DTDS() { DichVuDAL dal = new DichVuDAL(); return(dal.DTDS()); }
public List <double> LayTongTienDichVu() { DichVuDAL dal = new DichVuDAL(); return(dal.LayDSGiaDV()); }
public IEnumerable <DichVu> LayTatCa(string[] includes = null) { DichVuDAL dal = new DichVuDAL(db); return(dal.LayTatCa()); }
public DichVuBLL() { this.dich = new DichVuDAL(); }
/// <summary> /// /// </summary> /// <returns></returns> public IEnumerable <DichVu> GetAllServices(string contractId) { DichVuDAL dal = new DichVuDAL(db); return(dal.GetAllService(contractId)); }
public IEnumerable <DichVu> TimKiemGanDungTheoTen(string thongTin) { DichVuDAL dal = new DichVuDAL(db); return(dal.TimKiemGanDungTheoTen(thongTin)); }
public DichVuBUS() { dvdal = new DichVuDAL(); }