public JsonResult ResetPasswordEmployee(DtoEmployee emp)
        {
            List <String> listResult = new List <String>();
            String        sResult    = "";

            if (contEmployee.ResetPasswordEmployee(emp).Count > 0)
            {
                DtoEmployee objEmp = contEmployee.ResetPasswordEmployee(emp)[0];
                contNotification = new CtrlNotification(objEmp, "Sinapsis", "Restore Password");
                if (contNotification.SendMail())
                {
                    sResult = "Verifique su bandeja de correo ";
                }
                else
                {
                    sResult = "Error: Al enviar el correo ";
                }
            }
            else
            {
                sResult = "Error: Cuenta de correo no encontrada";
            }
            listResult.Add(sResult);
            return(Json(listResult, JsonRequestBehavior.AllowGet));
        }
        public JsonResult ListEmployee(DtoEmployee emp)
        {
            List <DtoEmployee> list = null;

            if (emp.bEmp_type_select)
            {
                list = contEmployee.ListEmployee(emp);
            }
            else
            {
                list = contEmployee.ListEmployeeSelect(emp);
            }

            return(Json(list, JsonRequestBehavior.AllowGet));
        }
 // GET: Login  Employee
 public JsonResult LoginEmployee(DtoEmployee emp)
 {
     return(Json(contEmployee.loginEmployee(emp), JsonRequestBehavior.AllowGet));
 }
Esempio n. 4
0
 public JsonResult UpdatePasswordUser(DtoEmployee emp)
 {
     return(Json(contEmployee.UpdateEmployeePassword(emp), JsonRequestBehavior.AllowGet));
 }
 public JsonResult EmployeeDelete(DtoEmployee emp)
 {
     return(Json(contEmployee.DeleteEmployee(emp), JsonRequestBehavior.AllowGet));
 }
 public JsonResult EmployeeInsertUpdate(DtoEmployee emp)
 {
     return(Json(contEmployee.InsertUpdateEmployee(emp), JsonRequestBehavior.AllowGet));
 }
 public JsonResult ListEmployeeUpdate(DtoEmployee emp)
 {
     return(Json(contEmployee.ListEmployeeUpdate(emp), JsonRequestBehavior.AllowGet));
 }