Пример #1
0
        public ActionResult Save(OtherPageInfo mode)
        {
            OtherPageBLL otherPageBLL = new OtherPageBLL();
            bool         b            = otherPageBLL.SaveOtherPage(mode);

            return(Json(new { success = b }, JsonRequestBehavior.AllowGet));
        }
Пример #2
0
        public OtherPageList getList(OtherPageInfo model)
        {
            OtherPageList otherPageList = new OtherPageList();
            DataTable     dt            = otherPageDAL.getList(model);

            otherPageList.rows  = dt.toList <OtherPageInfo>();
            otherPageList.total = otherPageDAL.getCount(model);
            return(otherPageList);
        }
Пример #3
0
        public ActionResult SearchOtherPage(OtherPageInfo model)
        {
            model.page = int.Parse(Request["page"]);
            model.rows = int.Parse(Request["rows"]);
            OtherPageBLL  otherPageBLL = new OtherPageBLL();
            OtherPageList list         = otherPageBLL.getList(model);

            return(Json(list, JsonRequestBehavior.AllowGet));
        }
Пример #4
0
        public bool SaveOtherPage(OtherPageInfo mode)
        {
            bool b = false;

            if (mode.Id > 0)
            {
                b = otherPageDAL.UpdateOtherPage(mode);
            }
            else
            {
                b = otherPageDAL.InsertOtherPage(mode);
            }
            return(b);
        }
Пример #5
0
        public bool UpdateOtherPage(OtherPageInfo mode)
        {
            StringBuilder sbAddUser           = new StringBuilder();
            string        GetSessionWithDsmId = string.Format(@"update otherpage set ImgFile='{0}',Url ='{1}',CreateDate ='{2}',
                Name ='{3}'  where Id ='{4}'
               ", mode.ImgFile, mode.Url, mode.CreateDate, mode.Name, mode.Id);
            int           iResult             = DBHelper.ExcuteNoQuerySql(GetSessionWithDsmId);

            if (iResult == 1)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Пример #6
0
        public bool InsertOtherPage(OtherPageInfo mode)
        {
            StringBuilder sbAddUser = new StringBuilder();

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

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