public String getFromMail(String userId) { UsersEnt userEnt=new UsersEnt(); User user= new User(); user.Emp_ID=userId; User fromMail = userEnt.getUser(user); return fromMail.Email.ToString(); }
public List<User> getAuthIDAndNameEmail(String toUserRole) { UsersEnt userEnt2 = new UsersEnt(); User user2=new User(); user2.Role = toUserRole; List<User> authUser = userEnt2.getEmp(user2); return authUser; }
public List<User> getClerkEmail() { User user = new User(); user.Role="Clerk"; UsersEnt userEnt = new UsersEnt(); List<User> clerkList= userEnt.getEmp(user); return clerkList; }
public void sendEmailToDeptHead(User user) { UsersEnt ent = new UsersEnt(); User usr = ent.getUser(user); string Body = usr.Emp_Name + "has Submitted a requisition form for your Approval"; string subject = "Requisition Form for Approval"; NotificationMsg msg = new NotificationMsg(); msg.sendSingleNotification(user, subject, Body); }
public String getEmpName(String userId) { User user = new User(); user.Emp_ID = userId; UsersEnt userEnt = new UsersEnt(); var userInfo = userEnt.getEmp(user).First(); user.Emp_Name = userInfo.Emp_Name; return user.Emp_Name; }
public static void encryptPassword(string empID) { UsersEnt usrE = new UsersEnt(); User usr = new User(); usr.Emp_ID = empID; usr = usrE.getEmp(usr).First(); usr.Password = CreateHash(usr.Password); usrE.updateEmp(usr); }
public void emailNotification(String toEmpName, String fromUserID, String subject, String msgBody) { User toUser = new User(); toUser.Emp_ID = getEmpId(toEmpName); UsersEnt usrE = new UsersEnt(); toUser = usrE.getEmp(toUser).First(); User fromUser = new User(); fromUser.Emp_ID = fromUserID; fromUser = usrE.getEmp(fromUser).First(); NotificationMsg notiMsg = new NotificationMsg(); notiMsg.sendAuthUserNotification(fromUser.Email, toUser.Email, subject, msgBody); }
protected void Page_Load(object sender, EventArgs e) { //Session["Emp_ID"] = "Emp17"; UsersEnt supE = new UsersEnt(); User usr = new User(); usr.Emp_ID = (string)Session["Emp_ID"]; usr = supE.getEmp(usr).First(); NotificationMsg nm = new NotificationMsg(); int cntMsg = nm.countMailBox((string)Session["Emp_ID"]); int cntInbox = cntMsg; //int cntInbox = 2; param1.Value = Convert.ToString(cntInbox); param_Emp.Value = usr.Emp_Name; param_Role.Value = usr.Role; }
public LoginController() { userEnt = new UsersEnt(); status = false; role = null; }
public ChangePasswordController() { usrEnt = new UsersEnt(); }