コード例 #1
0
        public static List <DoiTac> GetDoiTacs(string strSQL)
        {
            try
            {
                List <DoiTac> lstDoiTac = new List <DoiTac>();
                DataTable     dt        = new DataTable();
                dt = new Data.DM.DoiTac().GetDoiTacs(strSQL);
                if (dt.Rows.Count > 0)
                {
                    foreach (DataRow dr in dt.Rows)
                    {
                        lstDoiTac.Add(DoiTac.GetDoiTacByRow(dr));
                    }
                }
                dt.Dispose();
                dt = null;

                return(lstDoiTac);
            }
            catch (Exception ex)
            {
                LogError.WriteLogError("GetDoiTacs: ", ex);
                return(new List <DoiTac>());
            }
        }
コード例 #2
0
        public DoiTac GetDoiTacByMaDoiTac(string MaDoiTac)
        {
            DoiTac    objDoiTac = new DoiTac();
            DataTable dt        = new DataTable();

            dt = new Data.DM.DoiTac().GetCacDoiTacs(MaDoiTac);
            if (dt.Rows.Count == 1)
            {
                objDoiTac = DoiTac.GetDoiTacByRow(dt.Rows[0]);
            }
            return(objDoiTac);
        }
コード例 #3
0
        /// <summary>
        /// Tra ve thong tin cua doi tac du vao so dien thoai
        /// </summary>
        /// <param name="PhoneNumber">So dien thoai</param>
        /// <returns>Du lieu doi tac</returns>
        public static DoiTac GetDoiTacByOPhoneNumber(string PhoneNumber)
        {
            DoiTac    objDoiTac = null;
            DataTable dt        = new DataTable();

            dt = new Data.DM.DoiTac().GetDoiTacByOPhoneNumber(PhoneNumber);
            if (dt.Rows.Count >= 1)
            {
                objDoiTac = DoiTac.GetDoiTacByRow(dt.Rows[0]);
            }
            dt.Dispose();
            return(objDoiTac);
        }
コード例 #4
0
        public static DoiTac GetDoiTacByOPhoneNumber_KhacMaMoiGioi(string MaMoiGioi, string PhoneNumber)
        {
            DoiTac    objDoiTac = new DoiTac();
            DataTable dt        = new DataTable();

            dt = new Data.DM.DoiTac().GetDoiTacByOPhoneNumber_KhongCungMa(MaMoiGioi, PhoneNumber);
            if (dt.Rows.Count >= 1)
            {
                objDoiTac = DoiTac.GetDoiTacByRow(dt.Rows[0]);
            }
            dt.Dispose();
            dt = null;
            return(objDoiTac);
        }
コード例 #5
0
        public List <DoiTac> GetListOfDoiTacs_ByNhanVien(string MaNhanVien)
        {
            List <DoiTac> lstDoiTac = new List <DoiTac>();
            DataTable     dt        = new DataTable();

            dt = new Data.DM.DoiTac().GetListOfDoiTacs_ByNhanVien(MaNhanVien);// lay ta ca
            if (dt.Rows.Count > 0)
            {
                foreach (DataRow dr in dt.Rows)
                {
                    lstDoiTac.Add(DoiTac.GetDoiTacByRow(dr));
                }
            }

            return(lstDoiTac);
        }
コード例 #6
0
        public List <DoiTac> GetCacDoiTacs_LastUpdate(DateTime LastUpdate)
        {
            try
            {
                List <DoiTac> lstDoiTac = new List <DoiTac>();
                var           dt        = new DataTable();
                dt = new Data.DM.DoiTac().GetCacDoiTacs_LastUpdate(LastUpdate);// lay ta ca
                if (dt.Rows.Count > 0)
                {
                    foreach (DataRow dr in dt.Rows)
                    {
                        lstDoiTac.Add(DoiTac.GetDoiTacByRow(dr));
                    }
                }

                return(lstDoiTac);
            }
            catch (Exception ex)
            {
                LogError.WriteLogError("GetCacDoiTacs_LastUpdate: ", ex);
                return(new List <DoiTac>());
            }
        }
コード例 #7
0
        public List <DoiTac> GetListOfDoiTacs(bool isActive)
        {
            try
            {
                List <DoiTac> lstDoiTac = new List <DoiTac>();
                DataTable     dt        = new DataTable();

                dt = new Data.DM.DoiTac().GetDSDoiTacs(isActive);// lay ta ca
                if (dt.Rows.Count > 0)
                {
                    foreach (DataRow dr in dt.Rows)
                    {
                        lstDoiTac.Add(DoiTac.GetDoiTacByRow(dr));
                    }
                }

                return(lstDoiTac);
            }
            catch (Exception ex)
            {
                LogError.WriteLogError("GetListOfDoiTacs: ", ex);
                return(new List <DoiTac>());
            }
        }