Example #1
0
        public DeliveryFollowUpOptionQM GetDeliveryFollowUpEnquiryForGrid(DateTime FromDate)
        {
            DeliveryFollowUpOptionQM ds = new DeliveryFollowUpOptionQM();

            using (var connection = new DbConnectionProvider().CreateConnection())
            {
                connection.Open();

                var command = new GetDeliveryFollowUpEnquiryForGridSelectCommand {
                    Connection = connection
                };
                ds = command.Execute(FromDate);
            }

            return(ds);
        }
        public DeliveryFollowUpOptionQM Execute(DateTime FromDate)
        {
            DeliveryFollowUpOptionQM response = new DeliveryFollowUpOptionQM();

            using (var sqlCommand = CreateCommand())
            {
                sqlCommand.Connection  = Connection;
                sqlCommand.CommandText = "[dbo].[uspGetDeliveryFollowUpEnquiry]";
                sqlCommand.CommandType = CommandType.StoredProcedure;
                sqlCommand.Parameters.Add(AddParameter("@CutOffDate", SsDbType.DateTime, ParameterDirection.Input, FromDate));

                using (var reader = SsDbCommandHelper.ExecuteReader(sqlCommand))
                {
                    response.getDeliveryFollowUpOptionModel = reader.ToList <DeliveryFollowUpOptionModel>();
                }
            }

            return(response);
        }