示例#1
0
        public DataTable GetByParent(string pID)
        {
            string    sql = "select * from DM_CoQuanHanhChinh where CoQuanQuanLy=" + pID;
            DataTable dt  = Sys_Common.getDataByQuery(sql);

            return(dt);
        }
示例#2
0
        public DataTable GetByParent(string pID, int type)
        {
            string    sql = "select DanhMucID,TenDanhMuc from DanhMucMedia where DanhMucCha=" + pID + " and TheLoai=" + type;
            DataTable dt  = Sys_Common.getDataByQuery(sql);

            return(dt);
        }
示例#3
0
        public DataTable GetByParent(string pID)
        {
            string    sql = "select * from Document where DanhMuc=" + pID;
            DataTable dt  = Sys_Common.getDataByQuery(sql);

            return(dt);
        }
示例#4
0
        public DataTable GetAll()
        {
            string    sql = "select * from VitriMenu";
            DataTable dt  = Sys_Common.getDataByQuery(sql);

            return(dt);
        }
示例#5
0
        public DataTable GetByParent(string pID)
        {
            string    sql = "select LoaiID,MaLoai,TenLoai,ParentID,Stt from DM_LoaiDiSan where ParentID=" + pID + " order by Stt";
            DataTable dt  = Sys_Common.getDataByQuery(sql);

            return(dt);
        }
示例#6
0
        public DataTable GetByParent(string p, string vitri, string lang = "vi")
        {
            string    sql = "select MenuID,TenMenu,dbo.getUrl(MenuID,'Menu',null) as url,ChucNangID from Menu where Duyet=1 and Vitri =" + vitri + " and ParentID=" + p + " and Lang='" + lang + "' order by Stt";
            DataTable dt  = Sys_Common.getDataByQuery(sql);

            return(dt);
        }
示例#7
0
        public DataTable GetAll()
        {
            string    sql = "select * from FrameView where Duyet=1";
            DataTable dt  = Sys_Common.getDataByQuery(sql);

            return(dt);
        }
示例#8
0
        public DataTable GetByPosition(string p, string lang = "vi")
        {
            string    sql = "select * from Menu where Vitri=" + p + " and Lang='" + lang + "'";
            DataTable dt  = Sys_Common.getDataByQuery(sql);

            return(dt);
        }
示例#9
0
        public DataTable GetByFrame(int frame)
        {
            string    sql = "select * from Menu where Duyet=1 and FrameViewID=" + frame;
            DataTable dt  = Sys_Common.getDataByQuery(sql);

            return(dt);
        }
示例#10
0
        public DataTable GetAll()
        {
            string    sql = "select * from DanhHieuNgheNhan";
            DataTable dt  = Sys_Common.getDataByQuery(sql);

            return(dt);
        }
示例#11
0
        public DataTable GetAll(string lang = "vi")
        {
            string    ten = lang == "vi" ? "TenDanhMuc" : "EngName";
            string    sql = "select DanhMucID," + ten + " as TenDanhMuc,EngName,(select TenAnh from Image i where i.ImageID=d.HinhAnh) as HinhAnh,dbo.getUrl(DanhMucID,'DM_DiSan',null) as url from DM_DiSan d";
            DataTable dt  = Sys_Common.getDataByQuery(sql);

            return(dt);
        }
示例#12
0
        public NV_Menu_ChiTiet GetByUrl(string url)
        {
            string          sql  = "select top 1 *,dbo.getUrl(MenuID,'Menu',null) as UrlFull from Menu where Duyet=1 and TenUrl='" + url + "'";
            DataTable       dt   = Sys_Common.getDataByQuery(sql);
            NV_Menu_ChiTiet menu = new NV_Menu_ChiTiet();

            if (dt != null && dt.Rows.Count > 0)
            {
                menu = new NV_Menu_ChiTiet(dt);
            }
            return(menu);
        }
示例#13
0
        public NV_BaiViet_AnPham_ChiTiet GetByUrl(string url)
        {
            string    sql = "select top 1 *,(select TenAnh from Image i where i.ImageID=bv.HinhAnh) as AnhDaiDien from BaiViet_AnPham bv where Duyet=1 and Url='" + url + "'";
            DataTable dt  = Sys_Common.getDataByQuery(sql);
            NV_BaiViet_AnPham_ChiTiet bv = new NV_BaiViet_AnPham_ChiTiet();

            if (dt != null && dt.Rows.Count > 0)
            {
                bv = new NV_BaiViet_AnPham_ChiTiet(dt);
            }
            return(bv);
        }
示例#14
0
        public NV_AnPham_ChiTiet GetByUrl(string url)
        {
            string            sql = "select top 1 * from AnPham where Url='" + url + "'";
            DataTable         dt  = Sys_Common.getDataByQuery(sql);
            NV_AnPham_ChiTiet bv  = new NV_AnPham_ChiTiet();

            if (dt != null && dt.Rows.Count > 0)
            {
                bv = new NV_AnPham_ChiTiet(dt);
            }
            return(bv);
        }
示例#15
0
        public NV_DanhMucDuong_ChiTiet GetByUrl(string url)
        {
            string    sql = "select top 1 * from DanhMucDuong where Url='" + url + "'";
            DataTable dt  = Sys_Common.getDataByQuery(sql);
            NV_DanhMucDuong_ChiTiet menu = new NV_DanhMucDuong_ChiTiet();

            if (dt != null && dt.Rows.Count > 0)
            {
                menu = new NV_DanhMucDuong_ChiTiet(dt);
            }
            return(menu);
        }
示例#16
0
        public NV_DanhMucAnPham_ChiTiet GetByUrl(string url)
        {
            string    sql = "select top 1 *,dbo.getUrl(DanhMucID,'DanhMucAnPham',null) as UrlFull from DanhMucAnPham where Url='" + url + "'";
            DataTable dt  = Sys_Common.getDataByQuery(sql);
            NV_DanhMucAnPham_ChiTiet menu = new NV_DanhMucAnPham_ChiTiet();

            if (dt != null && dt.Rows.Count > 0)
            {
                menu = new NV_DanhMucAnPham_ChiTiet(dt);
            }
            return(menu);
        }
示例#17
0
        public NV_DiSanVanHoa_ChiTiet GetByUrl(string url)
        {
            //string sql = "select top 1 *,(select TenAnh from Image where ImageID=AnhBanDo) as TenAnhBanDo from DiSanVanHoa where Url='" + url + "'";
            string    sql             = "select top 1 *,'' as TenAnhBanDo from DiSanVanHoa where Url='" + url + "'";
            DataTable dt              = Sys_Common.getDataByQuery(sql);
            NV_DiSanVanHoa_ChiTiet ds = new NV_DiSanVanHoa_ChiTiet();

            if (dt != null && dt.Rows.Count > 0)
            {
                ds = new NV_DiSanVanHoa_ChiTiet(dt);
            }
            return(ds);
        }
示例#18
0
        public NV_DM_DiSan_ChiTiet GetByUrl(string url)
        {
            string              sql = "select DanhMucID,TenDanhMuc,EngName,(select TenAnh from Image i where i.ImageID=d.HinhAnh) as HinhAnh,dbo.getUrl(DanhMucID,'DM_DiSan',null) as url from DM_DiSan d where d.Url='" + url + "'";
            DataTable           dt  = Sys_Common.getDataByQuery(sql);
            NV_DM_DiSan_ChiTiet dm  = new NV_DM_DiSan_ChiTiet();

            if (dt != null && dt.Rows.Count > 0)
            {
                dm.DanhMucID  = int.Parse(dt.Rows[0]["DanhMucID"].ToString());
                dm.TenDanhMuc = dt.Rows[0]["TenDanhMuc"].ToString();
                dm.EngName    = dt.Rows[0]["EngName"].ToString();
                dm.Url        = dt.Rows[0]["url"].ToString();
                dm.HinhAnh    = dt.Rows[0]["HinhAnh"].ToString();
            }
            return(dm);
        }
示例#19
0
        public int taoStt(int stt, int pID)
        {
            string    sql = "select Stt from DM_LoaiDisan where ParentID=" + pID + " order by Stt";
            DataTable dt  = Sys_Common.getDataByQuery(sql);

            if (dt != null && dt.Rows.Count > 0)
            {
                if (dt.Rows[0]["Stt"].ToString().Equals("1"))
                {
                    dt.Rows[0]["Stt"] = "2";
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        //if(dt.Rows[""])
                    }
                }
            }
            return(1);
        }
示例#20
0
        public NV_DM_LoaiDiSan_ChiTiet GetByUrl(string url)
        {
            string    sql = "select * from DM_LoaiDiSan where Url='" + url + "'";
            DataTable dt  = Sys_Common.getDataByQuery(sql);
            NV_DM_LoaiDiSan_ChiTiet model = new NV_DM_LoaiDiSan_ChiTiet();

            if (dt != null && dt.Rows.Count > 0)
            {
                model.LoaiID  = int.Parse(dt.Rows[0]["LoaiID"].ToString());
                model.MaLoai  = dt.Rows[0]["MaLoai"].ToString();
                model.TenLoai = dt.Rows[0]["TenLoai"].ToString();
                model.EngName = dt.Rows[0]["EngName"].ToString();
                try
                {
                    model.ParentID = int.Parse(dt.Rows[0]["ParentID"].ToString());
                }
                catch { }
                model.GhiChu = dt.Rows[0]["GhiChu"].ToString();
                model.Stt    = int.Parse(dt.Rows[0]["Stt"].ToString());
            }
            return(model);
        }