コード例 #1
0
        public ActionResult Create(tblColaboradore colaborador)
        {
            var          colBLL = new ColaboradorBLL();
            ActionResult Result = null;

            try
            {
                if (ModelState.IsValid)
                {
                    colBLL.Create(colaborador);
                    Result = RedirectToAction("Index");
                }
                else
                {
                    Result = RedirectToAction("Index");
                }
            }
            catch
            {
                Result = RedirectToAction("Index");
            }
            return(Result);
        }