Example #1
0
        private void DanhSachNhom()
        {
            daKhachHang dKH = new daKhachHang();

            stoNhom.DataSource = dKH.DanhSachDanhMuc();
            stoNhom.DataBind();

            slbNhom.SelectedItem.Index = 0;
        }
Example #2
0
        private void DanhSachKhachHang(DateTime rTuNgay, DateTime rDenNgay)
        {
            daKhachHang dKH = new daKhachHang();

            dKH.KH.Nhom = slbNhom.SelectedItem.Value;
            dKH.MaDonVi = txtMaDonVi.Text.Trim();
            dKH.TuNgay  = rTuNgay;
            dKH.DenNgay = rDenNgay;

            stoKhachHang.DataSource = dKH.DanhSach();
            stoKhachHang.DataBind();
        }
Example #3
0
        public void Edit(int id, string field, string oldvalue, string newvalue, object BangKH)
        {
            daKhachHang dKH = new daKhachHang();

            Newtonsoft.Json.Linq.JObject node = JSON.Deserialize <Newtonsoft.Json.Linq.JObject>(BangKH.ToString());

            dKH.KH.MaBuuCuc    = node.Property("MaBuuCuc").Value.ToString();
            dKH.KH.MaKhachHang = node.Property("MaKhachHang").Value.ToString();

            try
            {
                dKH.KH.NgayPhatSinhDoanhThu = DateTime.Parse(node.Property("NgayPhatSinhDoanhThu").Value.ToString());
                dKH.CapNhatNgay();
                grdKhachHang.GetStore().GetById(id).Commit();
            }
            catch
            {
                X.Msg.Alert("", "Nhập sai định dạng ngày!").Show();
                grdKhachHang.GetStore().GetById(id).Reject();
            }
        }