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);
            }
        }
Example #2
0
        public double GetTotalOfServiceListBLL(string contractId, int quantityClient)
        {
            DichVuDAL dal = new DichVuDAL(db);

            if (!contractId.Equals(""))
            {
                return(dal.GetTotalOfServiceListDAL(contractId));
            }
            return(0.0);
        }
Example #3
0
        public bool CapNhat(DichVu item)
        {
            DichVuDAL dal = new DichVuDAL(db);

            if (item != null)
            {
                return(dal.CapNhat(item));
            }
            else
            {
                return(false);
            }
        }
Example #4
0
        public bool ThemDichVu(DichVu dv)
        {
            DichVuDAL dal = new DichVuDAL();

            if (TimDVTheoMa(dv.MaDichVu) == null)
            {
                return(dal.ThemDV(dv));
            }
            else
            {
                return(false);
            }
        }
Example #5
0
        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);
        }
Example #6
0
        public bool Xoa(DichVu item)
        {
            DichVuDAL dal = new DichVuDAL(db);

            try
            {
                if (item != null)
                {
                    return(dal.Xoa(item));
                }
                else
                {
                    return(false);
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
Example #7
0
        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;
            }
        }
Example #8
0
        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;
            }
        }
Example #9
0
        public DichVu GetServiceById(string id)
        {
            DichVuDAL dal = new DichVuDAL(db);

            return(dal.GetServiceById(id));
        }
Example #10
0
        /// <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());
        }
Example #11
0
        /// <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());
        }
Example #12
0
        public List <string> LayDSTenDV()
        {
            DichVuDAL dal = new DichVuDAL();

            return(dal.LayDSTenDV());
        }
Example #13
0
        public List <DichVu> DSDichVu()
        {
            DichVuDAL dal = new DichVuDAL();

            return(dal.DSDichVu());
        }
Example #14
0
        public DataTable DTDS()
        {
            DichVuDAL dal = new DichVuDAL();

            return(dal.DTDS());
        }
Example #15
0
        public List <double> LayTongTienDichVu()
        {
            DichVuDAL dal = new DichVuDAL();

            return(dal.LayDSGiaDV());
        }
Example #16
0
        public IEnumerable <DichVu> LayTatCa(string[] includes = null)
        {
            DichVuDAL dal = new DichVuDAL(db);

            return(dal.LayTatCa());
        }
Example #17
0
 public DichVuBLL()
 {
     this.dich = new DichVuDAL();
 }
Example #18
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public IEnumerable <DichVu> GetAllServices(string contractId)
        {
            DichVuDAL dal = new DichVuDAL(db);

            return(dal.GetAllService(contractId));
        }
Example #19
0
        public IEnumerable <DichVu> TimKiemGanDungTheoTen(string thongTin)
        {
            DichVuDAL dal = new DichVuDAL(db);

            return(dal.TimKiemGanDungTheoTen(thongTin));
        }
Example #20
0
 public DichVuBUS()
 {
     dvdal = new DichVuDAL();
 }