Get() public méthode

public Get ( int timeTrackId ) : UserTimeTrackHistoryMapped
timeTrackId int
Résultat UserTimeTrackHistoryMapped
        public ActionResult Create(UserTimeTrackHistoryMapped utth,FormCollection collection)
        {
            var userList = MembershipUserExtended.GetFullNameUserNameList();
            string userName=collection["UserName"];
            if (userList.ContainsValue(userName))
            {
                utth.UserName = userName;

                DateTime clockInDt;
                DateTime clockOutDt;
                if (DateTime.TryParse(utth.ClockInTime, out clockInDt) && DateTime.TryParse(utth.ClockOutTime, out clockOutDt))
                {
                    if (clockOutDt.TimeOfDay.CompareTo(clockInDt.TimeOfDay) != -1) // if clock out time is earlier than clock in time than error
                    {
                        utth.ClockInTime = string.Format("{0:t}", clockInDt);
                        utth.ClockOutTime = string.Format("{0:t}", clockOutDt);

                        utth.UserId = MembershipUserExtended.GetUserIdByUserName(userName);
                        utth.CreatedBy = LoggedInUserName;
                        utth.CreatedDate = WebHelpers.GetCurrentDateTimeByTimeZoneId(WebConfigurationManager.AppSettings["UserTimeZoneId"]);
                        utth.IsDeleted = false;
                        var tth = utth.Get(utth.Save());
                        tth.UserName = userList.FindKeyByValue(userName);
                        ViewBag.Message = "Record inserted successfully.";
                        return View(tth);
                    }
                    ViewBag.Message = "Clock Out time can not be earlier than Clock In time.";
                    return View(utth);
                }
                ViewBag.Message = "Not a valid Clock In/Out time, please make sure time is in correct format.";
                return View(utth);
            }
            ViewBag.Message = "Error inserting record.";
            return View(new UserTimeTrackHistoryMapped());
        }