예제 #1
0
        public async Task <ActionResult> MyProfile(string sessionid)
        {
            ViewBag.SessionID = sessionid;
            Authenticate();
            try
            {
                using (EmployeeInfoDataDbContext employeeInfoDataDbContext = new EmployeeInfoDataDbContext())
                {
                    EmployeeInfoDataModel employeeInfoDataModel = await employeeInfoDataDbContext.EmployeeInfoDataDbSet.Where(model => model.empid.Equals(sessionid)).FirstOrDefaultAsync();

                    if (employeeInfoDataModel == null)
                    {
                        return(HttpNotFound());
                    }
                    return(View(employeeInfoDataModel));
                }
            }
            catch
            {
                return(HttpNotFound());
            }
        }