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); }
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 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); }
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; }