예제 #1
0
        public async Task <AddBabyResponse> AddBabyDetail(AddBabyRequest brData)
        {
            var babyResponse = new AddBabyResponse();

            try
            {
                var msg = CheckErrorMessage(brData);
                if (msg == "")
                {
                    var babyDetail = _babyData.AddBabyDetail(brData);
                    babyResponse.Status        = "true";
                    babyResponse.Message       = babyDetail.responseMsg;
                    babyResponse.BabySubjectId = babyDetail.babySubjectId;
                }
                else
                {
                    babyResponse.Status  = "false";
                    babyResponse.Message = msg;
                }
            }
            catch (Exception e)
            {
                babyResponse.Status  = "false";
                babyResponse.Message = e.Message;
            }
            return(babyResponse);
        }
예제 #2
0
        public async Task <AddBabyResponse> UpdateBaby(UpdateBabyRequest brData)
        {
            var babyResponse = new AddBabyResponse();

            try
            {
                var msg = CheckBabyErrorMessage(brData);
                if (msg == "")
                {
                    var babyDetail = _profileData.UpdateBaby(brData);
                    if (babyDetail.success == true)
                    {
                        babyResponse.Status        = "true";
                        babyResponse.Message       = babyDetail.responseMsg;
                        babyResponse.BabySubjectId = babyDetail.subjectId;
                    }
                    else
                    {
                        babyResponse.Status        = "false";
                        babyResponse.Message       = babyDetail.responseMsg;
                        babyResponse.BabySubjectId = babyDetail.subjectId;
                    }
                }
                else
                {
                    babyResponse.Status  = "false";
                    babyResponse.Message = msg;
                }
            }
            catch (Exception e)
            {
                babyResponse.Status  = "false";
                babyResponse.Message = e.Message;
            }
            return(babyResponse);
        }