Exemple #1
0
        public NghiepVu TimKiemTheoMa(string id)
        {
            NghiepVuDAL dal = new NghiepVuDAL(db);

            try
            {
                if (!string.IsNullOrEmpty(id))
                {
                    if (dal.TimKiemTheoMa(id) != null)
                    {
                        return(dal.TimKiemTheoMa(id));
                    }
                    else
                    {
                        return(null);
                    }
                }
                else
                {
                    return(null);
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
Exemple #2
0
        public bool ThemMoi(NghiepVu item)
        {
            NghiepVuDAL dal = new NghiepVuDAL(db);

            try
            {
                if (item != null)
                {
                    if (TimKiemTheoMa(item.MaNghiepVu) != item)
                    {
                        return(dal.ThemMoi(item));
                    }
                    else
                    {
                        return(false);
                    }
                }
                else
                {
                    return(false);
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
Exemple #3
0
        public bool CapNhat(NghiepVu item)
        {
            NghiepVuDAL dal = new NghiepVuDAL(db);

            try
            {
                if (item != null)
                {
                    return(dal.CapNhat(item));
                }
                else
                {
                    return(false);
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
Exemple #4
0
        public IEnumerable <NghiepVu> TimKiemGanDungTheoTen(string thongTin)
        {
            NghiepVuDAL dal = new NghiepVuDAL(db);

            return(dal.TimKiemGanDungTheoTen(thongTin));
        }
Exemple #5
0
        public IEnumerable <NghiepVu> LayTatCa()
        {
            NghiepVuDAL dal = new NghiepVuDAL(db);

            return(dal.LayTatCa());
        }