Beispiel #1
0
        private void GetNhanVien(int manv)
        {
            List <nhanVien> nv  = new List <nhanVien>();
            string          url = "api/nv/id/" + manv.ToString();

            nv = ServiceConnector.GetDataFromServiceByGet <nhanVien>(url, true);
            if (nv.Count > 0)
            {
                txtMaNV.Text       = nv[0].maNhanVien.ToString();
                txtHoTen.Text      = nv[0].hoTen.ToString();
                dtNgaySinh.Text    = nv[0].ngaySinh.ToString("dd/MM/yyyy");
                stDienThoai.Text   = nv[0].soDienThoai.ToString();
                stDCThuongTru.Text = nv[0].diaChi.ToString();
                stTenDangNhap.Text = nv[0].tenDangNhap.ToString();
                _CurrentPassword   = nv[0].matKhau;
                if (nv[0].gioiTinh == true)
                {
                    cbxgioitinh.SelectedIndex = 0;
                }
                else
                {
                    cbxgioitinh.SelectedIndex = 1;
                }
                cbxChiNhanh.SelectedValue = nv[0].maCNLamViec.ToString();
                divLabelMaNV.Visible      = divTextboxMaNV.Visible = true;
            }
        }
Beispiel #2
0
        private void BindRefData()
        {
            cbxTruSo.DataSource = ServiceConnector.GetDataFromServiceByGet <TruSo>("api/truso/all", true);
            cbxTruSo.DataBind();

            cbxChiNhanh.DataSource = ServiceConnector.GetDataFromServiceByGet <ChiNhanh>("api/chinhanh/all", true);
            cbxChiNhanh.DataBind();
        }
Beispiel #3
0
 private void LoadDSKH()
 {
     string url = "api/kh/all";
     if (cbxTimKiem.SelectedValue == "MaKH")
     {
         url = "api/kh/id/" + txtTimKiem.Text.ToString();
     }
     else if (cbxTimKiem.SelectedValue == "CMND")
     {
         url = "api/kh/cmnd/" + txtTimKiem.Text.ToString();
     }
     gvKhachHang.DataSource = ServiceConnector.GetDataFromServiceByGet<khachHang>(url, true);
     gvKhachHang.DataBind();
 }    
        private void LoadDSNV()
        {
            string url = "api/nv/all";

            if (cbxTimKiem.SelectedValue == "MaNV")
            {
                url = "api/nv/id/" + txtTimKiem.Text.Trim();
            }
            else if (cbxTimKiem.SelectedValue == "HoTen")
            {
                url = "api/nv/hoten/" + txtTimKiem.Text.Trim();
            }
            gvNhanVien.DataSource = ServiceConnector.GetDataFromServiceByGet <nhanVien>(url, true);
            gvNhanVien.DataBind();
        }
Beispiel #5
0
        private void GetKhachHang(int makh)
        {
            List <khachHang> kh  = new List <khachHang>();
            string           url = "api/kh/id/" + makh.ToString();

            kh = ServiceConnector.GetDataFromServiceByGet <khachHang>(url, true);
            if (kh.Count > 0)
            {
                txtmakh.Text        = kh[0].maKhachHang.ToString();
                txthoten.Text       = kh[0].hoTen.ToString();
                txtsocmnd.Text      = kh[0].soCMND.ToString();
                txtngaysinh.Text    = kh[0].ngaySinh.ToString("dd/MM/yyyy");
                txtdienthoai.Text   = kh[0].dienThoai.ToString();
                txtemail.Text       = kh[0].email.ToString();
                txtdcthuongtru.Text = kh[0].diaChiThuongTru.ToString();
                txtdclienlac.Text   = kh[0].diaChiLienLac.ToString();
                if (kh[0].gioiTinh == true)
                {
                    cbxgioitinh.SelectedIndex = 0;
                }
                else
                {
                    cbxgioitinh.SelectedIndex = 1;
                }
                if (kh[0].tinhTrangHonNhan == true)
                {
                    cbxtinhtranghonnhan.SelectedIndex = 1;
                }
                else
                {
                    cbxtinhtranghonnhan.SelectedIndex = 0;
                }
                txtngaylap.Text = kh[0].ngayLap.ToString("dd/MM/yyyy");
                if (kh[0].tinhTrangHoatDong == true)
                {
                    cbxtinhtranghoatdong.SelectedIndex = 0;
                }
                else
                {
                    cbxtinhtranghoatdong.SelectedIndex = 1;
                }
                cbxchinhanh.SelectedValue = kh[0].maCNDangky.ToString();
                divLabelMaKH.Visible      = divTextboxMaKH.Visible = true;
                _SoDu = kh[0].soDuTaiKhoan;
            }
        }
 private List <khachHang> GetKH(string makh)
 {
     return(ServiceConnector.GetDataFromServiceByGet <khachHang>("api/kh/id/" + makh, true));
 }
 private void BindGridData()
 {
     gvSoTietKiem.DataSource = ServiceConnector.GetDataFromServiceByGet <SoTietKiem>("api/stk/all", isJavaService: false);
     gvSoTietKiem.DataBind();
 }