Exemplo n.º 1
0
        public string AddUserDetails(UserLogin userLogin, UserDetail userDetails)
        {
            string response;
            //userLogin.Status = "Active";
            DateTime updateddate = TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, INDIAN_ZONE);//DateTime.UtcNow.ToShortDateString();

            userLogin.RegDate     = updateddate;
            userLogin.UpdatedDate = userDetails.UpdatedDate = updateddate;
            try
            {
                UserLogin l1 = userLoginRepository.AddLoginCredentials(userLogin);
                userDetails.UserLoginId = l1.UserLoginId;
                UserDetail l2 = userDetailsRepository.AddUserDetails(userDetails);
                response = "sucess";
            }
            catch (Exception ex)
            {
                response = "failure";
            }
            return(response);
        }