예제 #1
0
 public void UpdateInterfaceRequest(InterfaceRequestDTO iRequestDetails)
 {
     //int rowsAffected = _dapperManager.Execute(@"UPDATE InterfaceRequest SET USERID=@USERID,PROJECT_NAME=@PROJECT_NAME,NO_INTERFACES=@NO_INTERFACES,PROJECT_DESCRIPTION=@PROJECT_DESCRIPTION,BUDGET_UPPER_LIMIT=@BUDGET_UPPER_LIMIT,BUDGET_LOWER_LIMIT=@BUDGET_LOWER_LIMIT,EXPECTED_TIMELINE=@EXPECTED_TIMELINE,INTERFACE_ENGINE=@INTERFACE_ENGINE,ENVIRONMENT_TYPE=@ENVIRONMENT_TYPE,ENVIRONMENT_ACCESS_GATEWAY=@ENVIRONMENT_ACCESS_GATEWAY,MESSAGE_STANDARD=@MESSAGE_STANDARD,APPLICATION=@APPLICATION,DESTINATION_DETAILS=@DESTINATION_DETAILS,ISDELETED=@ISDELETED,CREATED_BY=@CREATED_BY,CREATED_ON=@CREATED_ON,UPDATED_BY=@UPDATED_BY,UPDATED_ON=@UPDATED_ON WHERE ID=@ID",
     //                        new
     //                        {
     //                            USERID = iRequestDetails.UserId,
     //                            PROJECT_NAME = iRequestDetails.ProjectName,
     //                            NO_INTERFACES = iRequestDetails.NoInterfaces,
     //                            PROJECT_DESCRIPTION = iRequestDetails.ProjectDescription,
     //                            BUDGET_UPPER_LIMIT = iRequestDetails.BudgetUpperLimit,
     //                            BUDGET_LOWER_LIMIT = iRequestDetails.BudgetLowerLimit,
     //                            EXPECTED_TIMELINE = iRequestDetails.ExpectedTimeline,
     //                            INTERFACE_ENGINE = iRequestDetails.InterfaceEngine,
     //                            ENVIRONMENT_TYPE = iRequestDetails.EnvironmentType,
     //                            ENVIRONMENT_ACCESS_GATEWAY = iRequestDetails.EnvironmentAccessGateway,
     //                            MESSAGE_STANDARD = iRequestDetails.MessageStandard,
     //                            APPLICATION = iRequestDetails.Application,
     //                            DESTINATION_DETAILS = iRequestDetails.DestinationDetails,
     //                            ISDELETED = iRequestDetails.IsDeleted,
     //                            CREATED_BY = iRequestDetails.CreatedBy,
     //                            CREATED_ON = iRequestDetails.CreatedOn,
     //                            UPDATED_BY = iRequestDetails.UpdatedBy,
     //                            UPDATED_ON = iRequestDetails.UpdatedOn
     //                        });
     return;
 }
예제 #2
0
        public int AddInterfaceRequest(InterfaceRequestDTO iRequestDetails)
        {
            int id = _dapperManager.QuerySingle <int>(@"INSERT INTO InterfaceRequest(USER_ID,PROJECT_NAME,NO_INTERFACES,PROJECT_DESCRIPTION,BUDGET_UPPER_LIMIT,BUDGET_LOWER_LIMIT,EXPECTED_TIMELINE,ISDELETED,CREATED_BY,CREATED_ON,UPDATED_BY,UPDATED_ON,ORDER_STATUS_ID,START_DATE) VALUES (@USERID,@PROJECT_NAME,@NO_INTERFACES,@PROJECT_DESCRIPTION,@BUDGET_UPPER_LIMIT,@BUDGET_LOWER_LIMIT,@EXPECTED_TIMELINE,@ISDELETED,@CREATED_BY,@CREATED_ON,@UPDATED_BY,@UPDATED_ON,@ORDER_STATUS_ID,@START_DATE);SELECT LAST_INSERT_ID()",
                                                      new
            {
                USERID              = iRequestDetails.User_Id,
                PROJECT_NAME        = iRequestDetails.Project_Name,
                NO_INTERFACES       = iRequestDetails.No_Interfaces,
                PROJECT_DESCRIPTION = iRequestDetails.Project_Description,
                BUDGET_UPPER_LIMIT  = iRequestDetails.Budget_Upper_Limit,
                BUDGET_LOWER_LIMIT  = iRequestDetails.Budget_Lower_Limit,
                EXPECTED_TIMELINE   = iRequestDetails.Expected_Timeline,
                ISDELETED           = iRequestDetails.IsDeleted,
                CREATED_BY          = iRequestDetails.Created_By,
                CREATED_ON          = iRequestDetails.Created_On,
                UPDATED_BY          = iRequestDetails.Updated_By,
                UPDATED_ON          = iRequestDetails.Updated_On,
                ORDER_STATUS_ID     = iRequestDetails.Order_Status_Id,
                START_DATE          = iRequestDetails.Start_Date
            });

            if (id > 0)
            {
                return(id);
            }
            else
            {
                return(0);
            }
        }
예제 #3
0
        public bool AddInterfaceRequest(InterfaceRequestInputModel requestDetails)
        {
            bool isInterfaceAdded = false;
            InterfaceRequestDTO iRequestDetails = _mapper.Map <InterfaceRequestDTO>(requestDetails);
            int interfaceID = _repo.AddInterfaceRequest(iRequestDetails);

            if (interfaceID > 0)
            {
                isInterfaceAdded = true;
                foreach (IRDetailsMapping interfaceDetail in requestDetails.InterfaceDetailsList)
                {
                    interfaceDetail.Request_Id = interfaceID;
                    bool isDetailsAdded = _repo.AddInterfaceDetails(_mapper.Map <IRDetailsMappingDTO>(interfaceDetail));
                    if (isDetailsAdded)
                    {
                        continue;
                    }
                    else
                    {
                        isInterfaceAdded = false;
                        break;
                    }
                }
            }
            return(isInterfaceAdded);
        }
예제 #4
0
        public void UpdateInterfaceRequest(InterfaceRequestInputModel iRequestDetails)
        {
            InterfaceRequestDTO userDTO = _mapper.Map <InterfaceRequestDTO>(iRequestDetails);

            _repo.UpdateInterfaceRequest(userDTO);
            return;
        }
예제 #5
0
        public InterfaceRequestInputModel GetInterfaceRequestById(int id)
        {
            InterfaceRequestDTO iRequestDTO = new InterfaceRequestDTO();

            iRequestDTO = _repo.GetInterfaceRequestById(id);
            return(_mapper.Map <InterfaceRequestInputModel>(iRequestDTO));
        }
예제 #6
0
        public InterfaceRequestDTO GetInterfaceRequestById(int id)
        {
            InterfaceRequestDTO        iRequestDTO = new InterfaceRequestDTO();
            List <InterfaceRequestDTO> iRequests   = _dapperManager.Query <InterfaceRequestDTO>(@"SELECT * FROM InterfaceRequest WHERE USER_ID=@ID",
                                                                                                new
            {
                ID = id
            }).ToList();

            if (iRequests.Count == 1)
            {
                iRequestDTO = iRequests.FirstOrDefault();
                return(iRequestDTO);
            }
            else
            {
                return(null);
            }
        }