Exemplo n.º 1
0
        public ActionResult Save(FootLinkViewModel mode)
        {
            FootLinkBLL bll = new FootLinkBLL();
            bool        b   = bll.SaveFootLink(mode);

            return(Json(new { success = b }, JsonRequestBehavior.AllowGet));
        }
Exemplo n.º 2
0
        public ActionResult SearchFootLink(FootLinkViewModel model)
        {
            model.page = int.Parse(Request["page"]);
            model.rows = int.Parse(Request["rows"]);
            FootLinkBLL  footbll = new FootLinkBLL();
            FootLinkList list    = footbll.getList(model);

            return(Json(list, JsonRequestBehavior.AllowGet));
        }
Exemplo n.º 3
0
        public FootLinkList getList(FootLinkViewModel model)
        {
            FootLinkList footLinkList = new FootLinkList();
            DataTable    dt           = footLinkDAL.getList(model);

            footLinkList.rows  = dt.toList <FootLinkModel>();
            footLinkList.total = footLinkDAL.getCount(model);
            return(footLinkList);
        }
Exemplo n.º 4
0
        public bool SaveFootLink(FootLinkViewModel mode)
        {
            bool b = false;

            if (mode.Id > 0)
            {
                b = footLinkDAL.UpdateFootLink(mode);
            }
            else
            {
                b = footLinkDAL.InsertFootLink(mode);
            }
            return(b);
        }
Exemplo n.º 5
0
        public bool UpdateFootLink(FootLinkViewModel mode)
        {
            StringBuilder sbAddUser           = new StringBuilder();
            string        GetSessionWithDsmId = string.Format(@"update FootLink set ImageURL='{0}',SiteURL ='{1}',CreateDate ='{2}',
                Name ='{3}'  where Id ='{4}'
               ", mode.ImageURL, mode.SiteURL, mode.CreateDate, mode.Name, mode.Id);
            int           iResult             = DBHelper.ExcuteNoQuerySql(GetSessionWithDsmId);

            if (iResult == 1)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Exemplo n.º 6
0
        public bool InsertFootLink(FootLinkViewModel mode)
        {
            StringBuilder sbAddUser = new StringBuilder();

            string GetSessionWithDsmId = string.Format(@"INSERT INTO FootLink 
                (ImageURL,SiteURL,Name,CreateDate) 
                VALUES('{0}','{1}','{2}','{3}')",
                                                       mode.ImageURL, mode.SiteURL, mode.Name, mode.CreateDate);
            int iResult = DBHelper.ExcuteNoQuerySql(GetSessionWithDsmId);

            if (iResult == 1)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }