Esempio n. 1
0
        /// <summary>
        /// hàm thực hiện trả về ds anh ba lai xe
        ///
        /// </summary>
        /// <returns></returns>
        public static List <DanhBaEx> GetDanhBaLaiXe()
        {
            List <DanhBaEx> listRet = new List <DanhBaEx>();

            try
            {
                List <NhanVien> listNV = new NhanVien().GetListNhanViens();

                foreach (NhanVien item in listNV)
                {
                    // tác số điện thoại
                    string[] arrDienThoai = item.DiDong.Split(";".ToCharArray());
                    for (int i = 0; i < arrDienThoai.Length; i++)
                    {
                        DanhBaEx dtx = new DanhBaEx(arrDienThoai[i], item.TenNhanVien, KieuDanhBa.CongTy, "", 0, "", true, "", "");
                        listRet.Add(dtx);
                    }
                }
            }
            catch (Exception ex)
            {
                LogError.WriteLogError("GetDanhBaLaiXe:", ex);
            }
            return(listRet);
        }
Esempio n. 2
0
        /// <summary>
        /// Get danh bạ đối tác có sự thay đổi
        /// </summary>
        /// <param name="LastUpdate"></param>
        /// <returns></returns>
        public static List <DanhBaEx> GetDanhBaMoiGioi_LastUpdate(DateTime LastUpdate)
        {
            List <DanhBaEx> listRet = new List <DanhBaEx>();

            try
            {
                DoiTac        dt     = new DoiTac();
                List <DoiTac> listDT = dt.GetCacDoiTacs_LastUpdate(LastUpdate);

                foreach (DoiTac doiTac in listDT)
                {
                    // tác số điện thoại
                    string[] arrDienThoai = doiTac.Phones.Split(";".ToCharArray());
                    for (int i = 0; i < arrDienThoai.Length; i++)
                    {
                        DanhBaEx dtx = new DanhBaEx(arrDienThoai[i], doiTac.Name + " - " + doiTac.Address, KieuDanhBa.MoiGioi, doiTac.MaDoiTac, doiTac.Vung, "", doiTac.IsActive, "", "");
                        listRet.Add(dtx);
                    }
                }
            }
            catch (Exception)
            {
                throw;
            }
            return(listRet);
        }
Esempio n. 3
0
        /// <summary>
        /// hàm thực hiện trả về ds anh ba môi giới
        /// </summary>
        public static List <DanhBaEx> GetDanhBaMoiGioi()
        {
            try
            {
                List <DanhBaEx> listRet = new List <DanhBaEx>();
                DoiTac          dt      = new DoiTac();
                List <DoiTac>   listDT  = dt.GetListOfDoiTacs(true);

                foreach (DoiTac doiTac in listDT)
                {
                    // tác số điện thoại
                    string[] arrDienThoai = doiTac.Phones.Split(";".ToCharArray());
                    for (int i = 0; i < arrDienThoai.Length; i++)
                    {
                        DanhBaEx dtx = new DanhBaEx(arrDienThoai[i], doiTac.Name + " - " + doiTac.Address, KieuDanhBa.MoiGioi, doiTac.MaDoiTac, doiTac.Vung, "", doiTac.IsActive, "", doiTac.KinhDo, doiTac.ViDo, "");
                        listRet.Add(dtx);
                    }
                }

                return(listRet);
            }
            catch (Exception ex)
            {
                LogError.WriteLogError("GetDanhBaMoiGioi: ", ex);
                return(new List <DanhBaEx>());
            }
        }
Esempio n. 4
0
        /// <summary>
        /// hàm thực hiện lấy danh bạ công ty.
        /// </summary>
        /// <returns></returns>
        public static List <DanhBaEx> GetDanhBaCONGTY_GetLast(DateTime LastUpdate)
        {
            // ds danh bạ mở rộng trả về
            List <DanhBaEx> listRet = new List <DanhBaEx>();

            try
            {
                // lấy ds danh bạ công ty
                List <DanhBaCongTy> listDanhBa = DanhBaCongTy.GetDanhBaCONGTY_GetLast(LastUpdate);
                foreach (DanhBaCongTy dbcty in listDanhBa)
                {
                    string   Name = dbcty.Name.Length > 0 ? "[" + dbcty.Name + "] " : "";
                    DanhBaEx dtx  = new DanhBaEx(dbcty.PhoneNumber, Name + dbcty.Address, KieuDanhBa.CongTy, string.Empty, 0, "", true, "", "");
                    listRet.Add(dtx);
                }
            }
            catch (Exception)
            {
                throw;
            }
            return(listRet);
        }
Esempio n. 5
0
        /// <summary>
        /// hàm thực hiện lấy danh bạ công ty.
        /// </summary>
        /// <returns></returns>
        public static List <DanhBaEx> GetDanhBaCongTy()
        {
            // ds danh bạ mở rộng trả về
            List <DanhBaEx> listRet = new List <DanhBaEx>();

            try
            {
                // lấy ds danh bạ công ty
                List <DanhBaCongTy> listDanhBa = DanhBaCongTy.GetDanhSachDanhBaCongTy();
                foreach (DanhBaCongTy dbcty in listDanhBa)
                {
                    string   Name = dbcty.Name.Length > 0 ? "[" + dbcty.Name + "] " : "";
                    DanhBaEx dtx  = new DanhBaEx(dbcty.PhoneNumber, Name + dbcty.Address, KieuDanhBa.CongTy, string.Empty, 0, "", true, "", "");
                    listRet.Add(dtx);
                }
            }
            catch (Exception ex)
            {
                LogError.WriteLogError("GetDanhBaCongTy:", ex);
            }
            return(listRet);
        }