Example #1
0
 public string FrChooseSubmit(FormCollection form)
 {
     string result = string.Empty;
     TopFrChoose dal = new TopFrChoose();
     try
     {
         for (int i = 1; i < 19; i++)
         {
             if (form["topfrchoose" + i.ToString()] != null)
             {
                 var model = dal.GetSingledataById(i);
                 int tempint = 0;
                 int.TryParse(form["topfrchoose" + 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;
 }
Example #2
0
 public ActionResult FrChoose()
 {
     ViewBag.jsInit = Public.SuperAdminCommon.JSInit("FurnitureManage", "FurnitureFrChoose");
     TopFrChoose dal = new TopFrChoose();
     IList<Fr_TopChoose> topfrchoose = dal.GetAllModel();
     return View(topfrchoose);
 }