예제 #1
0
 public ActionResult new_client(ClientEntity clientEntity)
 {
     if (Session["FirstName"] == null && Session["LastName"] == null)
     {
         return(RedirectToAction("admin_login"));
     }
     else
     {
         var ExistClient = pablaAccountsEntities.tblUsers.Where(x => x.CorporateAccessNumber == clientEntity.CorporateAccessNumber && x.IsDeleted == false).FirstOrDefault();
         if (ExistClient == null)
         {
             TempData["Success"] = "2";
             clientBLL.AddNewClient(clientEntity);
         }
         else
         {
             ViewBag.ExistClient = "1";
             return(View());
         }
     }
     return(RedirectToAction("client"));
 }