Пример #1
0
        public List <CustomerInfo> GetCustomerInfoList(RequestCustomerInfo data)
        {
            List <CustomerInfo> ResultSet = new List <CustomerInfo>();

            using (IDbConnection connection = GetOpenConnection())
            {
                try
                {
                    var param = new DynamicParameters();
                    param.Add("@CustomerCode", data.CustomerCode);
                    ResultSet = connection.Query <CustomerInfo>("SP_GetCustomerInfo", param, commandType: CommandType.StoredProcedure).ToList();
                }
                catch (Exception ex)
                {
                    throw ex;
                }
                finally
                {
                    if (connection != null)
                    {
                        connection.Close();
                    }
                }
            }

            return(ResultSet);
        }
Пример #2
0
 public ResponseInfo <ResponseCustomerInfo> GetCustomer([FromBody] RequestCustomerInfo data)
 {
     try
     {
         return(base.PostDataToAPINotAuth <ResponseInfo <ResponseCustomerInfo> >(base.apiPathAndQuery, data));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Пример #3
0
        public ResponseInfo <ResponseCustomerInfo> GetCustomer([FromBody] RequestCustomerInfo data)
        {
            ResponseInfo <ResponseCustomerInfo> res = new ResponseInfo <ResponseCustomerInfo>();

            try
            {
                res = process.GetCustomerInfo(data);
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(res);
        }
Пример #4
0
        public ResponseInfo <ResponseCustomerInfo> GetCustomerInfo(RequestCustomerInfo data)
        {
            ResponseInfo <ResponseCustomerInfo> response = new ResponseInfo <ResponseCustomerInfo>();

            try
            {
                response.ResponseData = new ResponseCustomerInfo();
                response.ResponseData.ResCustomerInfo = SODAL.GetCustomerInfoList(data);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(response);
        }