|
Does anyone out there have an example of an ISO8583 transaction message.
I'm trying to work out how to manipulate the bit map of such a message - i.e. reading in the message and convrting the bitmap to an array of "Bools" so I can work out which fields are active, and vice versa when composing such a message from n array of 128 bools.
my first project using c# and .NET so not soo sure how to go about this.
basically, all I've to go on it this:-
Primary Bitmap
The bits of the Primary Bitmap are numbered from the left starting with ‘1’, up
to ‘64’. Each bit signifies the presence (1) or absence (0) in the message of the
data element associated with that particular bit, according to its position (i.e.
number) within the bitmap. The Primary Bitmap must always be present.
The first bit of the Primary Bitmap indicates the presence (1) or absence (0) of
WHEN THIS DATA ARRIVES I'm not sure how it looks - never actually seen one of these message, so don't know where to begin.
Any tips examples would be very much appreciated
Will
|
|
|
|
|
|
Ahh - I see what you mean. I can represent the individual bits in a BitArray. the "bitmap" is essentially a 128 long bitarray in this case.
what I am a little confused over is how this is represented in an ISO 8583 message - I think it's a HEX representation that's 16 bytes long.
however - I'm not sure how to get from 128 bits to a string that will represent the 128 bits.
e.g.
to get from "0110100100100101000101000100 etc.... to 128 bits long
to
DA10FE43 for example.
the main problem is that I've never seen an example of a message so am stuck as to what it should look like
|
|
|
|
|
Hi,
I would like to take a snapshot of folder structure to campare it in reguler intervel. What is the best approch for that?
Regards
rk.
|
|
|
|
|
If your compare operation is really just looking for changes,
you might want to look at the FileSystemWatcher[^] class in the .NET framework, you will then be notified when a change is made, rather than you polling the file system.
|
|
|
|
|
Hi,
I need to take the structure and compare it with other similar folders to check new as well as deleted files. So 'FileSystemWatcher' may not be useful in this scenario.
Thanks in advance.
regards,
rk.
|
|
|
|
|
Hi everybody,
Is it necessary to install Microsoft Office to add reference office.dll in a c# project. Please help me. I can't find the office.dll in the add reference window. I am not installed office in my machine.
Regards,
Rathish P S
|
|
|
|
|
yes, of course.
|
|
|
|
|
Hi ,
How can we do that ?
|
|
|
|
|
Hello,
i'd like to use a combobox with auto-completion like the one used by internet explorer to browse. How can i do that? Of course i'd like to add any items inside, like "Boat, "Car", "Moto", etc....
Thanks a lot
|
|
|
|
|
You need to implement the IAutoComplete2 interface,
Have a look here[^] for an example in c#
|
|
|
|
|
send mail to me and i will send my own autocomplete combobox dll.
ozturk_ferhat@hotmail.com
|
|
|
|
|
Sample c#
<br />
private void ACCombo_KeyUp(ComboBox cbo, KeyEventArgs e)<br />
{<br />
switch(e.KeyCode)<br />
{<br />
case Keys.Back:<br />
case Keys.Left:<br />
case Keys.Right:<br />
case Keys.Up:<br />
case Keys.Delete:<br />
case Keys.Down:<br />
return;<br />
}<br />
<br />
string strTypedText = cbo.Text;<br />
int intFoundIdx = cbo.FindString(strTypedText);<br />
<br />
if(intFoundIdx >= 0)<br />
{<br />
object objFoundItem = cbo.Items[intFoundIdx];<br />
<br />
string strFoundText = cbo.GetItemText(objFoundItem);<br />
<br />
string strAppendText = strFoundText.Substring(strTypedText.Length);<br />
cbo.Text = strTypedText + strAppendText;<br />
<br />
cbo.SelectionStart = strTypedText.Length;<br />
cbo.SelectionLength = strAppendText.Length;<br />
}<br />
}<br />
<br />
private void ACCombo_Leave(ComboBox cbo)<br />
{<br />
int intFoundIdx = cbo.FindStringExact(cbo.Text);<br />
cbo.SelectedIndex = intFoundIdx;<br />
}<br />
Let me know if you need this for VB.NET
I reject to reality and subsitute my own!
- Adam Savage, Mythbuster
life is like a roll of toilet paper. The closer it gets to the end, the faster it goes.
|
|
|
|
|
Thank you so much jklucker
exactly what i wanted
|
|
|
|
|
how to bind a richtextbox control's rtf property to the database??
I convert it to byte array and pass it on in a stream as a byte array and then call
Loadfile method of RichTextBox and pass the stream.
but it says that the specified file is not in a correct format
can u please suggest
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Text;
namespace deleteit1
{
public class richtextbox : System.Windows.Forms.Form
{
private System.Windows.Forms.Button button1;
private System.Windows.Forms.RichTextBox richTextBox2;
private deleteit1.Dataset1 dataset11;
private System.Windows.Forms.ComboBox comboBox1;
private System.ComponentModel.IContainer components;
public richtextbox()
{
InitializeComponent();
}
[STAThread]
static void Main()
{
Application.Run(new richtextbox());
}
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.button1 = new System.Windows.Forms.Button();
this.richTextBox2 = new System.Windows.Forms.RichTextBox();
this.dataset11 = new deleteit1.Dataset1();
this.comboBox1 = new System.Windows.Forms.ComboBox();
((System.ComponentModel.ISupportInitialize)(this.dataset11)).BeginInit();
this.SuspendLayout();
//
// button1
//
this.button1.Location = new System.Drawing.Point(552, 368);
this.button1.Name = "button1";
this.button1.TabIndex = 1;
this.button1.Text = "button1";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// richTextBox2
//
this.richTextBox2.Location = new System.Drawing.Point(16, 8);
this.richTextBox2.Name = "richTextBox2";
this.richTextBox2.Size = new System.Drawing.Size(624, 336);
this.richTextBox2.TabIndex = 2;
this.richTextBox2.Text = "richTextBox2";
this.richTextBox2.TextChanged += new System.EventHandler(this.richTextBox2_TextChanged);
//
// dataset11
//
this.dataset11.DataSetName = "Dataset1";
this.dataset11.Locale = new System.Globalization.CultureInfo("en-US");
//
// comboBox1
//
this.comboBox1.Location = new System.Drawing.Point(32, 368);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(320, 21);
this.comboBox1.Sorted = true;
this.comboBox1.TabIndex = 3;
this.comboBox1.Text = "comboBox1";
//
// richtextbox
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(680, 430);
this.Controls.Add(this.comboBox1);
this.Controls.Add(this.richTextBox2);
this.Controls.Add(this.button1);
this.Name = "richtextbox";
this.Text = "richtextbox";
this.Load += new System.EventHandler(this.richtextbox_Load);
((System.ComponentModel.ISupportInitialize)(this.dataset11)).EndInit();
this.ResumeLayout(false);
}
#endregion
SqlConnection con = new SqlConnection();
private void richtextbox_Load(object sender, System.EventArgs e)
{
con.ConnectionString = @"data source = DEVELOPMENT;user id = SHC;password = SHC;initial catalog = SHC";
if(con.State == 0)
{
con.Open();
}
try
{
string st;
st = "select * from deleteit";
SqlDataAdapter ad = new SqlDataAdapter(st,con);
ad.Fill(dataset11,0,0,"deleteit");
char[] chardata = new char[1000];
DataTable dt = dataset11.Tables[0];
ArrayList arr = new ArrayList();
//byte[] binaryData = new byte[1000];
//Encoder e1 = Encoding.UTF8.GetEncoder();
Encoding encode = Encoding.UTF8;
if(dt.Rows.Count>0)
{
foreach(DataRow row in dt.Rows)
{
// Convert the string into a byte[].
byte[] binaryData = encode.GetBytes(row["rtf"].ToString());
comboBox1.Items.Add(row["rtf"]);
comboBox1.SelectedIndex = 0;
//MessageBox.Show("binary data length = "+binaryData.Length.ToString());
arr.AddRange(binaryData);
}
}
else
{
MessageBox.Show("no rows");
}
byte[] bytearr = new byte[arr.Count];
arr.CopyTo(bytearr);
MessageBox.Show("byte array copied from arraylist="+ bytearr.GetType());
ASCIIEncoding encoding = new ASCIIEncoding();
richTextBox2.Rtf = encoding.GetString(bytearr);//,0,bytearr.Length);
System.IO.MemoryStream stream = new System.IO.MemoryStream((byte[])bytearr);
richTextBox2.LoadFile(stream,RichTextBoxStreamType.RichText);
}
catch(Exception ex)
{
MessageBox.Show(ex.Message.ToString());
MessageBox.Show(ex.StackTrace.ToString());
}
}
}
}
table name->deleteit
fields-->rollno(numeric),rtf(text)
|
|
|
|
|
I want to create an Archive Mail Reader in C#. With this one can view their mails. No options for editing, deleting or forwarding will be there. Can anyone give an idea about how it can be implemented using C#.
|
|
|
|
|
I have a javascript that creates a dynamic drop down with a person's name as the name is typed. Once the user clicks on the name from the dropdown the page reloads with that person's information in the pages web control's. This part works wonderfully. What doesn't work is when I try to manually edit the text boxes with new values. When I click on my Edit button the text boxes pick up on the intial values and not the new values that were put in the text box. Any ideas why?
|
|
|
|
|
Make sure you don't rebind the data on postback:
Page_Load:<br />
<br />
if(!IsPostBack){<br />
BindData();<br />
}
if you rebind the data here, your changed values will not appear
|
|
|
|
|
I'm trying to get these two methods to modify a value stored within the namespace Interface_Resources and the class TrafficCalculations. I am trying to get them to call two new methods called TrafficLimitIncrement (for UpButton) and TrafficLimitDecrement (for DownButton). How can I do this? I'm in a mental block atm and it's driving me nuts!
Cheers for any help.
[edit]I should probably mention that the Interface_Resources is a dll file being used by a form (which is using the methods UpButton and DownButton) to change a value.[/edit]
|
|
|
|
|
|
hii all .
i need to browse the web from a windows application , just like web application .
using link control or button how can i navigate to a web site or emailing and contacting some on .
thanx alot
لا اله الا الله محمد رسول الله
|
|
|
|
|
Use shellexecute. Or, I believe there's a static 'Process' class kicking around in the runtime that lets you do the same thing without interop.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
You could try adding a WebBrowser control on ur Windows' form. It will give u all the necessary functions for simulating a Web Browser, along with its behaviour.
Hope this helps
Regards,
Polis
Can you practice what you teach?
|
|
|
|
|
I have a propertygrid, I set its property SelectedObject to the object I want. It displays all the properties. Is there a way to make it display only the properties I want? And how to apply the chenges after the user clicks, let's say Apply button?
|
|
|
|
|
You need to apply attributes to your properties,
I beleive the attribute: BrowsableAttribute will determine whether it gets displayed or not.
As for applying the changes, I assume you have both get and set'ers in your code?
|
|
|
|