Ejemplo n.º 1
0
        public GetDespatchDetailsEnquiryQM GetDespatchDetailsEnquiryForGrid(DateTime FromDate, DateTime ToDate)
        {
            GetDespatchDetailsEnquiryQM getDespatchDetailsEnquiryQM = new GetDespatchDetailsEnquiryQM();

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

                var command = new GetDespatchDetailsEnquiryForGridSelectCommand {
                    Connection = connection
                };
                getDespatchDetailsEnquiryQM = command.Execute(FromDate, ToDate);
            }

            return(getDespatchDetailsEnquiryQM);
        }
Ejemplo n.º 2
0
        public GetDespatchDetailsEnquiryQM Execute(DateTime FromDate, DateTime ToDate)
        {
            GetDespatchDetailsEnquiryQM response = new GetDespatchDetailsEnquiryQM();

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

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

            return(response);
        }