public static int LayMaThucDonTuTenThucDon(string tenTD)
        {
            int maTD;

            maTD = ThucDonDAO.LayMaThucDonTuTenTD(tenTD);
            return(maTD);
        }
        //Rút trích dữ liệu: select
        public static List <ThucDonDTO> LayDSThucDon()
        {
            List <ThucDonDTO> _ds;

            _ds = ThucDonDAO.LayDSThucDon();
            return(_ds);
        }
        public static string LayTenThucDonTuMaThucDon(int maTD)
        {
            string tenTD;

            tenTD = ThucDonDAO.LayTenThucDonTuMaThucDon(maTD);
            return(tenTD);
        }
        public static List <ThucDonDTO> LayDSThucDonTheoMaLoai(int maLoai)
        {
            List <ThucDonDTO> _ds;

            _ds = ThucDonDAO.LayDSThucDonTheoMaLoai(maLoai);
            return(_ds);
        }
Beispiel #5
0
        public static string MaThucDonMoi()
        {
            ThucDonDAO p           = new ThucDonDAO();
            string     MaTDLonNhat = p.MaThucDonMoi();

            //MessageBox.Show(MaSPLonNhat);
            if (string.IsNullOrEmpty(MaTDLonNhat))
            {
                return("TD01");
            }
            else
            {
                int masotiep = int.Parse(MaTDLonNhat.Substring(2));/*MaSPLonNhat.Replace('S', '')*/
                //return string.Format("S{0:4}", masotiep + 1);
                return("TD" + (masotiep + 1).ToString("00"));
            }
        }
        public static List <ThucDonDTO> LayDSMaTDVaTenTDTheoMaLoai(int maLoai)
        {
            List <ThucDonDTO> dsTD = ThucDonDAO.LayDSMaTDVaTenTDTheoMaLoai(maLoai);

            return(dsTD);
        }
        public static bool KiemTraThucAnNuocUong(int maTD)
        {
            bool kq = ThucDonDAO.KiemTraThucDonNuocUong(maTD);

            return(kq);
        }
        public static bool ThemThucDon(ThucDonDTO td)
        {
            bool kq = ThucDonDAO.ThemThucDon(td);

            return(kq);
        }
        public static int MaTuTang()
        {
            int ma = ThucDonDAO.MaTuTang();

            return(ma);
        }
        public static bool KiemTraTenTDCapNhat(string tenTD, int maTD)
        {
            bool kq = ThucDonDAO.KiemTraTenTDCapNhat(tenTD, maTD);

            return(kq);
        }
        public static DataTable TraCuuThucDonTheoTen(string tenTD)
        {
            DataTable kq = ThucDonDAO.TraCuuThucDonTheoTen(tenTD);

            return(kq);
        }
Beispiel #12
0
        public List <ThucDonDTO> TraCuu(int x, int y)
        {
            ThucDonDAO a = new ThucDonDAO();

            return(a.TraCuu(x, y));
        }
Beispiel #13
0
        public bool CapNhat(ThucDonDTO thucdon)
        {
            ThucDonDAO a = new ThucDonDAO();

            return(a.CapNhatTD(thucdon));
        }
Beispiel #14
0
        public bool Them(ThucDonDTO thucdon)
        {
            ThucDonDAO a = new ThucDonDAO();

            return(a.ThemTD(thucdon));
        }
        public static DataTable LayDanhSachTDTheoMaLoai(int maLoai)
        {
            DataTable dt = ThucDonDAO.LayDanhSachTDTheoMaLoai(maLoai);

            return(dt);
        }
        public static bool XoaThucDonTheoMaTD(int maTD)
        {
            bool kq = ThucDonDAO.XoaThucDonTheoMaTD(maTD);

            return(kq);
        }
        public static string LayDonViTinhTuMaTD(int maTD)
        {
            string dvt = ThucDonDAO.LayDonViTinhTheoMaTD(maTD);

            return(dvt);
        }
        public static bool CapNhatThucDon(ThucDonDTO td)
        {
            bool kq = ThucDonDAO.CapNhatThucDon(td);

            return(kq);
        }
        public static bool KiemTraTrungTenThucDon(string tenTD)
        {
            bool kq = ThucDonDAO.KiemTraTrungTenThucDon(tenTD);

            return(kq);
        }
Beispiel #20
0
        public List <ThucDonDTO> DanhSachTD()
        {
            ThucDonDAO b = new ThucDonDAO();

            return(b.dsThucDon());
        }