Ejemplo n.º 1
0
 public ActionResult KnowAlls()
 {
     ViewBag.jsInit = Public.SuperAdminCommon.JSInit("FurnitureManage", "FurnitureKnowAlls");
     TopKnowAlls dal = new TopKnowAlls();
     IList<Fr_TopKnowAlls> topknowalls = dal.GetAllModel();
     return View(topknowalls);
 }
Ejemplo n.º 2
0
 public string KnowAllsSubmit(FormCollection form)
 {
     string result = string.Empty;
     TopKnowAlls dal = new TopKnowAlls();
     try
     {
         for (int i = 1; i < 19; i++)
         {
             if (form["topknowalls" + i.ToString()] != null)
             {
                 var model = dal.GetSingledataById(i);
                 int tempint = 0;
                 int.TryParse(form["topknowalls" + i.ToString()], out tempint);
                 if (tempint.Equals(0))
                     model.Tp_DcID_FK = null;
                 else
                     model.Tp_DcID_FK = tempint;
                 dal.Update(model);
             }
         }
         result = "1";
     }
     catch (Exception)
     {
         result = "0";
     }
     return result;
 }