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

            dt = new Data.DanhBaKhachAo().GetDanhBaKhachAo(PhoneNumber);
            if (dt.Rows.Count > 0)
            {
                return(dt.Rows[0]["Address"].ToString());
            }
            dt.Dispose();
            dt = null;
            return(string.Empty);
        }
Esempio n. 2
0
        public static List <DanhBaKhachAo> GetDanhSachKhachAo()
        {
            List <DanhBaKhachAo> listKhachAo = new List <DanhBaKhachAo>();
            DataTable            dt          = new DataTable();

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

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

            return(listKhachAo);
        }
Esempio n. 3
0
        public static List <DanhBaKhachAo> GetKhachAos(string strSQL)
        {
            List <DanhBaKhachAo> lstKhachAo = new List <DanhBaKhachAo>();
            DataTable            dt         = new DataTable();

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


                    lstKhachAo.Add(objKhachAo);
                }
            }
            dt.Dispose();
            dt = null;

            return(lstKhachAo);
        }