Ejemplo n.º 1
0
        /// <summary>
        /// tra ve dia chi cua so dien thoai
        /// </summary>
        public static string  GetDanhBa(string PhoneNumber)
        {
            DataTable dt = new DataTable();

            dt = new Data.DanhBaCongTy().GetDanhBaCONGTY(PhoneNumber);
            if (dt.Rows.Count > 0)
            {
                return(dt.Rows[0]["Address"].ToString());
            }
            dt.Dispose();
            dt = null;
            return(string.Empty);
        }
Ejemplo n.º 2
0
        public static string GetName(string PhoneNumber)
        {
            try
            {
                using (DataTable dt = new Data.DanhBaCongTy().GetDanhBaCONGTY(PhoneNumber))
                {
                    if (dt.Rows.Count > 0)
                    {
                        return(dt.Rows[0]["Name"].ToString());
                    }
                }
            }
            catch (Exception ex) { }

            return(string.Empty);
        }
Ejemplo n.º 3
0
        public static List <DanhBaCongTy> GetDanhSachDanhBaCongTy()
        {
            List <DanhBaCongTy> listKhachAo = new List <DanhBaCongTy>();
            DataTable           dt          = new DataTable();

            dt = new Data.DanhBaCongTy().GetDanhBaCONGTY(string.Empty);
            if (dt.Rows.Count > 0)
            {
                foreach (DataRow dr in dt.Rows)
                {
                    DanhBaCongTy objKhachao = new DanhBaCongTy();
                    objKhachao.PhoneNumber = dr["PhoneNumber"].ToString();
                    objKhachao.Name        = dr["Name"].ToString();
                    objKhachao.Address     = dr["Address"].ToString();

                    listKhachAo.Add(objKhachao);
                }
            }
            dt.Dispose();
            dt = null;

            return(listKhachAo);
        }
Ejemplo n.º 4
0
        public static List <DanhBaCongTy> GetDanhBaCongTys(string strSQL)
        {
            List <DanhBaCongTy> lstDanhBaCongTy = new List <DanhBaCongTy>();
            DataTable           dt = new DataTable();

            dt = new Data.DanhBaCongTy().GetDanhBaCongTys(strSQL);
            if (dt.Rows.Count > 0)
            {
                foreach (DataRow dr in dt.Rows)
                {
                    DanhBaCongTy objDanhBaCongTy = new DanhBaCongTy();
                    objDanhBaCongTy.PhoneNumber = StringTools.TrimSpace(dr["PhoneNumber"].ToString());
                    objDanhBaCongTy.Name        = StringTools.TrimSpace(dr["Name"].ToString());
                    objDanhBaCongTy.Address     = StringTools.TrimSpace(dr["Address"].ToString());


                    lstDanhBaCongTy.Add(objDanhBaCongTy);
                }
            }
            dt.Dispose();
            dt = null;

            return(lstDanhBaCongTy);
        }