Ejemplo n.º 1
0
 public List <CSF_Functions_LayTatCa_Result> Search(string strSearch)
 {
     try
     {
         List <CSF_Functions_LayTatCa_Result> objs = MyContext.CSF_Functions_LayTatCa().ToList();
         if (!String.IsNullOrEmpty(strSearch))
         {
             objs = objs.Where(f => f.Name.ToLower().Contains(strSearch.ToLower())).OrderBy(m => m.ID).ToList();
         }
         return(objs);
     }
     catch (Exception ex)
     {
         Logs.WriteLog(ex);
         throw;
     }
 }
Ejemplo n.º 2
0
 public ActionResult Create()
 {
     try
     {
         CSF_RoleFunction_DAO objFunctionsDAO = new CSF_RoleFunction_DAO();
         DT_WebGISEntities    MyContext       = new DT_WebGISEntities();
         TempData["nhomNguoiDung"] = MyContext.CSF_Roles.OrderBy(x => x.Name).ToList();
         TempData.Keep("nhomNguoiDung");
         TempData["chucNang"] = MyContext.CSF_Functions_LayTatCa().ToList().OrderBy(x => x.Name).ToList();
         TempData.Keep("chucNang");
         return(View());
     }
     catch (Exception ex)
     {
         SetAlert("Lỗi" + ex.Message.ToString(), AlertType.Error);
         Logs.WriteLog(ex);
         return(View());
     }
 }