Exemplo n.º 1
0
        public static ReportNoCollection GetReportNumbersByPostDate(DateTime postDate)
        {
            SqlCommand cmd = new SqlCommand();
            cmd.CommandType = CommandType.Text;
            cmd.CommandText = "Select Distinct ReportNo from tblPanelSetOrderCPTCodeBill where PostDate = @PostDate";
            cmd.Parameters.Add("@PostDate", SqlDbType.DateTime).Value = postDate;

            YellowstonePathology.Business.ReportNoCollection reportNoCollection = new ReportNoCollection();

            using (SqlConnection cn = new SqlConnection(Properties.Settings.Default.ProductionConnectionString))
            {
                cn.Open();
                cmd.Connection = cn;
                using (SqlDataReader dr = cmd.ExecuteReader())
                {
                    while (dr.Read())
                    {
                        YellowstonePathology.Business.ReportNo reportNo = new ReportNo(dr.GetString(0));
                        reportNoCollection.Add(reportNo);
                    }
                }
            }

            return reportNoCollection;
        }
Exemplo n.º 2
0
        public static ReportNoCollection GetReportNumbers()
        {
            SqlCommand cmd = new SqlCommand("gwGetReportNumbers");
            cmd.CommandType = CommandType.StoredProcedure;

            YellowstonePathology.Business.ReportNoCollection reportNoCollection = new ReportNoCollection();

            using (SqlConnection cn = new SqlConnection(Properties.Settings.Default.ProductionConnectionString))
            {
                cn.Open();
                cmd.Connection = cn;
                using (SqlDataReader dr = cmd.ExecuteReader())
                {
                    while (dr.Read())
                    {
                        YellowstonePathology.Business.ReportNo reportNo = new ReportNo(dr.GetString(0));
                        reportNoCollection.Add(reportNo);
                    }
                }
            }

            return reportNoCollection;
        }