示例#1
0
        public List <SendInvoiceData> SendInvoiceList(SendInvoiceListDataFind val, string providerId)
        {
            List <SendInvoiceData> r = new List <SendInvoiceData>();

            using (SQLiteConnection con = NewSQLiteConnection())
            {
                con.Open();
                using (SQLiteCommand cmd = new SQLiteCommand(con))
                {
                    cmd.CommandText = @"
select  
 id
,providerId
,ETN              
,invoiceXML       
,send_isSucceded  
,send_Message     
,send_Error       
,send_ErrorDetail 
,send_returnETN     
,send_returnFaturaNo
,query_Status
,query_Message

from GIB_Invoices where providerId=@providerId 
";
                    cmd.CommandType = CommandType.Text;
                    cmd.Parameters.Add(new SQLiteParameter("@providerId", providerId));

                    using (SQLiteDataReader reader = cmd.ExecuteReader())
                    {
                        while (reader.Read())
                        {
                            SendInvoiceData sendInvoiceData = new SendInvoiceData();
                            sendInvoiceData.Id                  = Convert.ToInt32(reader["id"]);
                            sendInvoiceData.ETN                 = reader["ETN"].ToString();
                            sendInvoiceData.InvoiceXML          = reader["invoiceXML"].ToString();
                            sendInvoiceData.Send_isSucceded     = ToBoolean(reader["send_isSucceded"]);
                            sendInvoiceData.Send_Message        = reader["send_Message"].ToString();
                            sendInvoiceData.Send_Error          = reader["send_Error"].ToString();
                            sendInvoiceData.Send_ErrorDetail    = reader["send_ErrorDetail"].ToString();
                            sendInvoiceData.Send_returnETN      = reader["send_returnETN"].ToString();
                            sendInvoiceData.Send_returnFaturaNo = reader["send_returnFaturaNo"].ToString();

                            sendInvoiceData.Query_Status  = ToInt(reader["query_Status"]);
                            sendInvoiceData.Query_Message = reader["query_Message"].ToString();

                            r.Add(sendInvoiceData);
                        }
                        reader.Close();
                    }
                }
                con.Close();
            }

            return(r);
        }
示例#2
0
 public List <SendInvoiceData> SendInvoiceList(SendInvoiceListDataFind val)
 {
     return(Data.SendInvoiceList(val, Provider.ProviderId()));
 }