예제 #1
0
 public ActionResult QueryInfo(InfoModel m)
 {
     try
     {
         m.InfoData       = DBHelper.QueryOneDicRow(QueryByIid, m.Iid);
         m.PageInfo.Count = (int)DBHelper.QueryOne(
             QueryCount, m.Iid);
         m.ReturnList = DBHelper.QueryDicRows(String.Format(QueryReturnsByIid, m.PageInfo.PageSize, m.PageInfo.Skip), m.Iid);
         m.Success    = true;
     }
     catch (Exception ex)
     {
         m.Fail(ex);
     }
     return(Json(m));
 }
예제 #2
0
 public ActionResult Add(InfoModel m)
 {
     try
     {
         bool check = DataUserController.CheckUser(Session, m);
         if (check)
         {
             return(Json(m));
         }
         DBHelper.Update(AddInfo, m.UserInfo["uid"],
                         m.Sid, m.Title, m.Info);
         m.Success = true;
     }
     catch (Exception ex)
     {
         m.Fail(ex);
     }
     return(Json(m));
 }