private void deliveryReportHandler(DeliveryReport <string, long> deliveryReport) { if (deliveryReport.Status == PersistenceStatus.NotPersisted) { this.logger.Log(LogLevel.Warning, $"Failed to log request time for path: {deliveryReport.Message.Key}"); } }
internal DeliveryReport <byte[], byte[]> Produce(TopicPartition topicPartition, Message <byte[], byte[]> message) { DeliveryReport <byte[], byte[]> r = new DeliveryReport <byte[], byte[]>(); r.Status = PersistenceStatus.NotPersisted; CreateTopic(topicPartition.Topic); if (topics[topicPartition.Topic].PartitionNumber > topicPartition.Partition) { topics[topicPartition.Topic].AddMessage(message.Key, message.Value, topicPartition.Partition); r.Status = PersistenceStatus.Persisted; } else { topics[topicPartition.Topic].CreateNewPartitions(topicPartition.Partition); topics[topicPartition.Topic].AddMessage(message.Key, message.Value, topicPartition.Partition); r.Status = PersistenceStatus.Persisted; } r.Message = message; r.Partition = topicPartition.Partition; r.Topic = topicPartition.Topic; r.Timestamp = new Timestamp(DateTime.Now); r.Error = new Error(ErrorCode.NoError); r.Status = PersistenceStatus.Persisted; // TODO r.Offset return(r); }
static async Task RunUntilUserKeypress(string kafkaUrl, string kafkaTopic, string kafkaPublishMessage) { Config config = new Config(); config["security.protocol"] = "ssl"; config["ssl.ca.location"] = ConfigurationManager.AppSettings["ssl.ca.location"]; config["ssl.certificate.location"] = ConfigurationManager.AppSettings["ssl.certificate.location"]; config["ssl.key.location"] = ConfigurationManager.AppSettings["ssl.key.location"]; config["ssl.key.password"] = ConfigurationManager.AppSettings["ssl.key.password"]; using (Producer producer = new Producer(config, kafkaUrl)) using (Topic topic = producer.Topic(kafkaTopic)) { Console.WriteLine($"{producer.Name} producing on {topic.Name}. Press any key to stop producing, which will also stop consuming."); var i = 0; while (!Console.KeyAvailable) //while (i < 1) { byte[] data = Encoding.UTF8.GetBytes($"{kafkaPublishMessage} {i}"); DeliveryReport deliveryReport = await topic.Produce(data); Console.WriteLine($"Produced to Partition: {deliveryReport.Partition}, Offset: {deliveryReport.Offset}"); i++; } ts.Cancel(); } }
private static DeliveryReport <string, string>[] ProduceMessages(string bootstrapServers, string topic, int partition, int count) { var producerConfig = new ProducerConfig { BootstrapServers = bootstrapServers }; var messages = new DeliveryReport <string, string> [count]; using (var producer = new Producer <string, string>(producerConfig)) { for (var index = 0; index < count; index++) { var message = producer.ProduceAsync( new TopicPartition(topic, partition), new Message <string, string> { Key = $"test key {index}", Value = $"test val {index}", Timestamp = Timestamp.Default, Headers = null } ).Result; messages[index] = message; Task.Delay(200).Wait(); } } return(messages); }
private void ProducerDeliveryHandler(DeliveryReport <Null, string> obj) { if (obj.Error?.IsError ?? false) { _trace.Warn($"Produce Error, {obj.Error.Code},{obj.Error.Reason},{obj.Error}"); } }
public void HandleDelivery(DeliveryReport <byte[], byte[]> record) { var d = new Dictionary <string, object> { { "topic", record.Topic }, { "partition", record.TopicPartition.Partition.ToString() } }; if (record.Error.IsError) { this.ErrCnt += 1; d["message"] = record.Error.ToString(); this.Send("producer_send_error", d); } else { this.DeliveryCnt += 1; d["offset"] = record.Offset.ToString(); d["_DeliveryCnt"] = DeliveryCnt.ToString(); lock (ProduceLock) { d["_ProduceCnt"] = MsgCnt.ToString(); } this.Send("producer_send_success", d); } if (ErrCnt + DeliveryCnt >= Config.MaxMsgs) { Stop($"All messages accounted for: {DeliveryCnt} delivered + {ErrCnt} failed >= {Config.MaxMsgs}"); } }
public void PublishTopic(MessageBase msg, string queueName, string borkerList) { if (string.IsNullOrWhiteSpace(borkerList)) { borkerList = ConnectionBuilder.getBorkerList(); } var topicConfig = new TopicConfig { CustomPartitioner = (top, key, cnt) => { cnt = 2; key = Encoding.UTF8.GetBytes(queueName); var kt = (key != null) ? Encoding.UTF8.GetString(key, 0, key.Length) : "(null)"; int partition = (key?.Length ?? 0) % cnt; bool available = top.PartitionAvailable(partition); _logger.LogInformation("Partitioner topic: {0} key: {1} partition count: {2} -> {3} {4}", top.Name, kt, cnt, partition, available); return(partition); } }; using (Producer producer = new Producer(borkerList)) using (Topic topic = producer.Topic(queueName, topicConfig))//topicConfig { DeliveryReport deliveryReport = topic.Produce(msg.MessageBodyByte).Result; _logger.LogInformation("发送到分区:{0}, Offset 为: {1}", deliveryReport.Partition, deliveryReport.Offset); } }
private void DeliveryHandler(DeliveryReport <Null, string> obj) { if (obj.Error.IsFatal || obj.Error.IsError) { System.Diagnostics.EventLog.WriteEntry("Xplatform.Kafka", "DeliveryHandler:" + obj.Error.Reason, System.Diagnostics.EventLogEntryType.Error); throw new Exception(obj.Error.Reason); } }
private static void KafkaProduceHandler(DeliveryReport <string, Message> r) { //Console.WriteLine($"Delivered message to {r.TopicPartitionOffset}"); if (r.Error.IsError) { Console.WriteLine($"Delivery Error: {r.Error.Reason}"); } }
/// <summary> /// Парсит ответ запроса отчета и мапит к классу DeliveryReport /// </summary> /// <param name="xml">XML ответ запроса отчета</param> /// <returns>Возвращает ответ приведенный к классу DeliveryReport</returns> public static DeliveryReport ParseDeliveryReportResponse(string xml) { if (string.IsNullOrWhiteSpace(xml)) { throw new ArgumentException("xml не может быть пустым", "xml"); } try { var document = new XmlDocument(); document.LoadXml(xml); var response = new DeliveryReport { Status = int.Parse(document.GetElementsByTagName("status").Item(0).InnerText), StatusDescription = SmsProNikitaStatuses.GetDeliveryReportStatusDescription(int.Parse(document.GetElementsByTagName("status").Item(0).InnerText)) }; var phoneList = new List <ReportPhone>(); var xRoot = document.DocumentElement; foreach (XmlElement xnode in xRoot) { if (xnode.Name != "phone") { continue; } var phone = new ReportPhone(); foreach (XmlNode childnode in xnode.ChildNodes) { switch (childnode.Name) { case "number": phone.Number = childnode.InnerText; break; case "report": phone.Report = int.Parse(childnode.InnerText); phone.ReportDescription = SmsProNikitaStatuses.GetReportStatusesDescription(int.Parse(childnode.InnerText)); break; case "sendTime": phone.SendTime = DateTime.ParseExact(childnode.InnerText, "yyyyMMddHHmmss", CultureInfo.InvariantCulture); break; case "rcvTime": phone.RcvTime = !string.IsNullOrWhiteSpace(childnode.InnerText) ? DateTime.ParseExact(childnode.InnerText, "yyyyMMddHHmmss", CultureInfo.InvariantCulture) : default(DateTime); break; } } phoneList.Add(phone); } response.Phones = phoneList.ToArray(); return(response); } catch (Exception e) { throw new ParseResponseException("Error Parse Delivery Report Response", e); } }
private void Handler(DeliveryReport <string, string> r) { if (r.Error.IsError) { throw new Exception(r.Error.Reason); } _logger.LogInformation($"Delivered message to {r.TopicPartitionOffset}"); }
private void DeliveryReport(DeliveryReport <string, string> obj) { MessageDetails detail = null; if (messages.TryGetValue(obj.Key, out detail)) { Console.WriteLine("Total time to transmit message - {0} is {1} - {2} ", obj.Key, obj.Timestamp.Type, (DateTime.UtcNow - detail.SentTime).TotalMilliseconds); } }
private void Handler(DeliveryReport <Null, string> result) { if (result?.Error?.IsError == false) { return; } StaticLog.Error($"Delivery Error: {result.Error.Code} - {result.Error.Reason}"); }
private void deliveryReportHandler(DeliveryReport <Null, string> deliveryReport) { if (deliveryReport.Status == PersistenceStatus.NotPersisted) { // It is common to write application logs to Kafka (note: this project does not provide // an example logger implementation that does this). Such an implementation should // ideally fall back to logging messages locally in the case of delivery problems. this.logger.Log(LogLevel.Warning, $"Message delivery failed: {deliveryReport.Message.Value}"); } }
private static void ProcessDeliveryReport(DeliveryReport <string, string> report) { // If this message was successfully delivered then make a note of the offset value, if it failed, DES it if (!report.Error.IsError) { Console.Write($"Delivery Error {report.Error.Reason} \n " + $"Offset {report.TopicPartitionOffset.Offset.ToString()} \n " + $"Reason: {report.Error.Reason}"); } }
public MasterReportBound GetDonationReport() { var reports = new List <DeliveryReport>(); var donation = new DeliveryReport(); UserProfile user = _userProfileService.GetUser(User.Identity.Name); donation.PreparedBy = user.GetFullName(); donation.ReportCode = DateTime.Now.ToString(); donation.ReportDate = DateTime.Now; donation.ReportName = "DistributionReport"; donation.ReportTitle = "Distribution Report"; Random ran = new Random(1); donation.Rows = new List <DeliveryRows>(); for (int i = 1; i < 200; i++) { DeliveryRows r = new DeliveryRows(); r.SINumber = "00001283"; r.Hub = donation.HubName; r.DeliveryOrderNumber = i.ToString().PadLeft(8, '0'); r.HubOwner = "DRMFSS"; r.PortName = "Djibuti"; r.ShippedBy = "WFP"; r.Vessel = "Liberty Sun"; r.Project = "DRMFSS 4765"; r.Commodity = "Cereal"; r.SubCommodity = "Wheat"; r.WareHouseNumber = i / 50 + 1; r.Unit = "mt"; r.DeliveryBag = 99 * i * decimal.Parse("12"); r.DeliveryQuantity = 67 * i * decimal.Parse("34.89"); r.DeliveryNet = 23 * i * decimal.Parse("81"); r.Donor = "US Aid"; r.DeliveryType = "Donation"; r.DeliveryReferenceNumber = i.ToString().PadLeft(8, '0'); r.Date = DateTime.Now.ToShortDateString(); r.TransportedBy = ((i % 3 == 0) ? " DRMFSS " : "Another Trasporter"); r.VehiclePlateNumber = "03-A0012" + (i / 24).ToString(); donation.Rows.Add(r); } reports.Add(donation); Cats.Web.Hub.Reports.DonationReportByProgram rpt = new Web.Hub.Reports.DonationReportByProgram() { DataSource = reports[0].Rows }; MasterReportBound report = new MasterReportBound() { Name = "Donation Report - " + DateTime.Now.ToShortDateString(), DataSource = reports }; report.rptSubReport.ReportSource = rpt; return(report); }
private void DeliveryReportHandler(DeliveryReport <string, T> deliveryReport) { if (deliveryReport.Error.IsError) { this.logger.LogError($"Delivery failed: {deliveryReport.Error.Reason}"); } else { this.logger.LogDebug($"Delivered '{deliveryReport.Value}' to '{deliveryReport.TopicPartitionOffset}'"); } }
public static void ProducerHandler(DeliveryReport <Null, string> report) { _logger.Information(""); _logger.Information($"Status: {report.Status}"); _logger.Information($"Partition: {report.Partition}"); _logger.Information($"Offset: {report.Offset}"); _logger.Information($"TopicPartition: {report.TopicPartition}"); _logger.Information($"TopicPartitionOffset: {report.TopicPartitionOffset}"); _logger.Information($"Value: {report.Value}"); _logger.Information(""); }
private void DeliveryHandler(DeliveryReport <TKey, TValue> deliveredItem) { if (deliveredItem.Error == null || deliveredItem.Error.Code == ErrorCode.NoError) { this.logger.LogDebug("Message delivered on {topic} / {partition} / {offset}", deliveredItem.Topic, (int)deliveredItem.Partition, (long)deliveredItem.Offset); } else { this.logger.LogError("Failed to delivery message to {topic} / {partition} / {offset}. Error: {error}", deliveredItem.Topic, (int)deliveredItem.Partition, (long)deliveredItem.Offset, deliveredItem.Error.ToString()); } }
// Delegate function for the result handling of the publication (delivery report). public static void SyncHandler(DeliveryReport <string, DataObjectMapping> inputDeliveryReport) { if (inputDeliveryReport.Error.Code != ErrorCode.NoError) { Console.WriteLine($"Failed to deliver message: {inputDeliveryReport.Error.Reason}"); } else { Console.WriteLine($"Produced message {inputDeliveryReport.Value} to topic {inputDeliveryReport.Topic} for partition {inputDeliveryReport.Partition} and offset {inputDeliveryReport.Offset}"); } }
public async void TratarCallBack(DeliveryReport <string, string> report) { if (report.Error.Code != ErrorCode.NoError) { _logger.LogInformation("deu bom"); } else { _logger.LogInformation("deu ruim"); }; }
public static void handler(DeliveryReport <string, string> dr) { if (dr.Error.IsError) { _log.Error($"Kafka Producer delivery error: {dr.Error.Reason}"); } //else //{ // _log.Debug($"Delivered to '{dr.TopicPartitionOffset}' : {dr.Message.Value}"); //} }
private static void HandleDelivery(DeliveryReport <string, string> deliveryReport) { if (deliveryReport.Error.Code != ErrorCode.NoError) { Console.WriteLine($"Failed to deliver message: {deliveryReport.Error.Reason}"); } else { Console.WriteLine($"Produced message to: {deliveryReport.TopicPartitionOffset}"); } }
static void handler(DeliveryReport <string, HelloFromProcess> deliveryReport) { if (deliveryReport.Error.IsError) { Console.WriteLine($"Delivery failed: {deliveryReport.Error.Reason}", Color.Red); } else { Console.WriteLine($"Delivered '{deliveryReport.Value}' to '{deliveryReport.TopicPartitionOffset}'", Color.LightGreen); } }
private void Callback(DeliveryReport <Null, string> handler, Guid id) { if (!handler.Error.IsError) { Console.WriteLine($"Sucesso na marcação do evento como processado do producer"); } else { Console.WriteLine($"Erro na marcação do evento como processado do producer, error: ", JsonSerializer.Serialize(handler.Error).ToString()); Console.WriteLine($"Detalhamento do erro: ", JsonSerializer.Serialize(handler).ToString()); } }
private bool IsFatalError(DeliveryReport <byte[], byte[]> report) { return(report.Error.IsFatal || report.Error.Code == ErrorCode.TopicAuthorizationFailed || report.Error.Code == ErrorCode.GroupAuthorizationFailed || report.Error.Code == ErrorCode.ClusterAuthorizationFailed || report.Error.Code == ErrorCode.UnsupportedSaslMechanism || report.Error.Code == ErrorCode.SecurityDisabled || report.Error.Code == ErrorCode.SaslAuthenticationFailed || report.Error.Code == ErrorCode.TopicException || report.Error.Code == ErrorCode.Local_KeySerialization || report.Error.Code == ErrorCode.Local_ValueSerialization || report.Error.Code == ErrorCode.OffsetMetadataTooLarge); }
private void AddReportNoDeliverable(DeliveryReport deliveryReport) { var query = string.Format("insert into deliveryreport (deliverableId,reportNO) values ({0}, {1})", deliveryReport.DeliverableId, deliveryReport.ReportNo); using (SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings[ConnectionString].ConnectionString)) { conn.Open(); using (SqlCommand cmd = new SqlCommand(query, conn)) { cmd.CommandType = CommandType.Text; cmd.ExecuteNonQuery(); } } }
private static void ConsumeMessage(Consumer <byte[], byte[]> consumer, DeliveryReport <Null, string> dr, string testString) { consumer.Assign(new List <TopicPartitionOffset>() { dr.TopicPartitionOffset }); var r = consumer.Consume(TimeSpan.FromSeconds(10)); Assert.NotNull(r?.Message); Assert.Equal(testString, r.Message.Value == null ? null : Encoding.UTF8.GetString(r.Message.Value, 0, r.Message.Value.Length)); Assert.Null(r.Message.Key); Assert.Equal(r.Message.Timestamp.Type, dr.Message.Timestamp.Type); Assert.Equal(r.Message.Timestamp.UnixTimestampMs, dr.Message.Timestamp.UnixTimestampMs); }
public void Publish(object obj, string _topic) { var env = AppConfigUtilities.GetAppConfig <string>("KAFKA_ENV"); var _config = new Config(); using (Producer producer = new Producer(_config, AppConfigUtilities.GetAppConfig <string>("KAFKA_URL"))) using (Topic topic = producer.Topic(_topic)) { var id = Encoding.UTF8.GetBytes(Guid.NewGuid().ToString()); byte[] data = Encoding.UTF8.GetBytes(obj.ToJSON()); DeliveryReport deliveryReport = topic.Produce(data, id).Result; } }
public void Produce(string topic, Message <byte[], byte[]> message, Action <DeliveryReport <byte[], byte[]> > deliveryHandler = null) { CreateTopic(topic); this.topics[topic].Add(message); DeliveryReport <byte[], byte[]> r = new DeliveryReport <byte[], byte[]>(); r.Message = message; r.Partition = 0; r.Topic = topic; r.Timestamp = new Timestamp(DateTime.Now); r.Error = new Error(ErrorCode.NoError); r.Status = PersistenceStatus.Persisted; deliveryHandler?.Invoke(r); }
public MasterReportBound GetDonationReport() { var reports = new List<DeliveryReport>(); var donation = new DeliveryReport(); UserProfile user = _userProfileService.GetUser(User.Identity.Name); donation.PreparedBy = user.GetFullName(); donation.ReportCode = DateTime.Now.ToString(); donation.ReportDate = DateTime.Now; donation.ReportName = "DistributionReport"; donation.ReportTitle = "Distribution Report"; Random ran = new Random(1); donation.Rows = new List<DeliveryRows>(); for (int i = 1; i < 200; i++) { DeliveryRows r = new DeliveryRows(); r.SINumber = "00001283"; r.Hub = donation.HubName; r.DeliveryOrderNumber = i.ToString().PadLeft(8, '0'); r.HubOwner = "DRMFSS"; r.PortName = "Djibuti"; r.ShippedBy = "WFP"; r.Vessel = "Liberty Sun"; r.Project = "DRMFSS 4765"; r.Commodity = "Cereal"; r.SubCommodity = "Wheat"; r.WareHouseNumber = i / 50 + 1; r.Unit = "mt"; r.DeliveryBag = 99 * i * decimal.Parse("12"); r.DeliveryQuantity = 67 * i * decimal.Parse("34.89"); r.DeliveryNet = 23 * i * decimal.Parse("81"); r.Donor = "US Aid"; r.DeliveryType = "Donation"; r.DeliveryReferenceNumber = i.ToString().PadLeft(8, '0'); r.Date = DateTime.Now.ToShortDateString(); r.TransportedBy = ((i % 3 == 0) ? " DRMFSS " : "Another Trasporter"); r.VehiclePlateNumber = "03-A0012" + (i / 24).ToString(); donation.Rows.Add(r); } reports.Add(donation); Cats.Web.Hub.Reports.DonationReportByProgram rpt = new Web.Hub.Reports.DonationReportByProgram() { DataSource = reports[0].Rows }; MasterReportBound report = new MasterReportBound() { Name = "Donation Report - " + DateTime.Now.ToShortDateString(), DataSource = reports }; report.rptSubReport.ReportSource = rpt; return report; }
public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs) { DeliveryReport ds = new DeliveryReport(); global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); global::System.Xml.Schema.XmlSchemaAny any = new global::System.Xml.Schema.XmlSchemaAny(); any.Namespace = ds.Namespace; sequence.Items.Add(any); type.Particle = sequence; global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); if (xs.Contains(dsSchema.TargetNamespace)) { global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); try { global::System.Xml.Schema.XmlSchema schema = null; dsSchema.Write(s1); for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); s2.SetLength(0); schema.Write(s2); if ((s1.Length == s2.Length)) { s1.Position = 0; s2.Position = 0; for (; ((s1.Position != s1.Length) && (s1.ReadByte() == s2.ReadByte())); ) { ; } if ((s1.Position == s1.Length)) { return type; } } } } finally { if ((s1 != null)) { s1.Close(); } if ((s2 != null)) { s2.Close(); } } } xs.Add(dsSchema); return type; }
public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); DeliveryReport ds = new DeliveryReport(); global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny(); any1.Namespace = "http://www.w3.org/2001/XMLSchema"; any1.MinOccurs = new decimal(0); any1.MaxOccurs = decimal.MaxValue; any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any1); global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny(); any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; any2.MinOccurs = new decimal(1); any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; sequence.Items.Add(any2); global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute(); attribute1.Name = "namespace"; attribute1.FixedValue = ds.Namespace; type.Attributes.Add(attribute1); global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); attribute2.Name = "tableTypeName"; attribute2.FixedValue = "customer_profileDataTable"; type.Attributes.Add(attribute2); type.Particle = sequence; global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); if (xs.Contains(dsSchema.TargetNamespace)) { global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); try { global::System.Xml.Schema.XmlSchema schema = null; dsSchema.Write(s1); for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); s2.SetLength(0); schema.Write(s2); if ((s1.Length == s2.Length)) { s1.Position = 0; s2.Position = 0; for (; ((s1.Position != s1.Length) && (s1.ReadByte() == s2.ReadByte())); ) { ; } if ((s1.Position == s1.Length)) { return type; } } } } finally { if ((s1 != null)) { s1.Close(); } if ((s2 != null)) { s2.Close(); } } } xs.Add(dsSchema); return type; }
public virtual int Fill(DeliveryReport.customer_profileDataTable dataTable, object order_date) { this.Adapter.SelectCommand = this.CommandCollection[0]; if ((order_date == null)) { throw new global::System.ArgumentNullException("order_date"); } else { this.Adapter.SelectCommand.Parameters[0].Value = ((object)(order_date)); } if ((this.ClearBeforeFill == true)) { dataTable.Clear(); } int returnValue = this.Adapter.Fill(dataTable); return returnValue; }