Wednesday, July 1, 2009

Getting my Indane Cylinder Transfered From Hennur to Lakkasandra

I have an Indane LPG connection since 2001 in Bangalore. I used it regularly till 2005 as I lived as a student in the same house. 2005 to 2009 I had to change houses due to change in college and jobs; during these period I did not use my own LPG connection as the friends with whom I shared flats they had their own connection in the same locality. In 2009 I am living in Wilson Garden area with another friend. I have to use my own LPG connection this time. So I need to transfer it to this locality. Before that I had called up once the old agency (Sudheendra) where my account exists now for booking a cylinder after around 3 years gap; the person on phone has asked me to come with a letter. So, I have decided to transfer my account to the new address. Lets see what all I will have to go through and I will be sharing it with you. In the mean time I gathered information regarding this and I came across many sites but the info provided in the following blog seems to be realistic.
Indane Connection Transfer
Well I am done with the Transfer work. I had to devote my one Saturday for it. The process is although simple but as I had lost the bill that we get at initial connection time; I had to do extra work of Notary at a cost of Rs. 150 . The process : I had to go to the Sudheendra Agency from where I had to transfer. I stood up in the queue as the door keeper insisted. I waited for my turn and met the manager. I was asked to show the regulator, the gas book, the new address proof (rent agreement), the notary (format or declaration text for that was provided to me by the manager's aid). That's it. The manager made a new bill or voucher for the connection and assigned the new agency called Madhu agency to my connection. Next I had to go to the Madhu agency in my new locality and show the bill with the gas book and the regulator. That's it my work was done. O ya I had to pay Rs.25 to the new agency for which I wasn't given any receipt; perhaps the processing fee :) . Two days later the refill was delivered to my apartment. Happy Cooking .

Tuesday, March 24, 2009

Use of XML File for dynamically storing Data and retriving Data in with C#

Hi Friends,
XML is really an interesting file that you can use as a database in which you can store a set of data.Say for example in your website project you want to have a page through which a guest user can enter his name, email ID and his comments. Such data may not be commercial for you to store in your data base but at the same time you want to have it for goodwill purpose. Here is the solution, store it in an XML file and retrieve its node values on a web page, as cool as that.

Here is an example to show how it can be done.
Step1: Add a page within your solution with three text boxes to enter name(txtName), email(txtEmail) and comment(txtComment) also place a button for submit( btnSubmit) as shown in the image below. You may add required field validators too.

Step2: Add into your project solution an XML file and rename it (StoreUserInfo.xml). Create a root node into it
Step3: On button click paste the following code:

//protected void btnSubmit_Click(object sender, EventArgs e)
// {
XmlDocument oXmlDocument = new XmlDocument();


XmlNode oXmlRootNode = oXmlDocument.SelectSingleNode("records");

XmlNode oXmlRecordNode = oXmlRootNode.AppendChild(oXmlDocument.CreateNode(
XmlNodeType.Element,"record", ""));

"Name","")).InnerText = txtName.Text;

"Email", "")).InnerText = txtEmail.Text;

"Comment", "")).InnerText = txtComment.Text;


// }
Note: You have to specify the path of XML file correctly as per your project. In my case its D:\Sanju\XMLDb1\StoreUserInfo.xml it will be different for you.
This piece of code will automatically create the child nodes along with its values entered in the text boxes at each click of the submit button.

Step4: Once you have successfully submitted the records you will like to see all the submitted records on different web page but within same project solution. For that you add a new page in your project. Now you can display the data from XML file on text box, label or richtext box whereever you desire. In my example I will use both text box as well as Label controls. Design of my Display page is same as above page with an additional Label control.

Note: On the display page you will be needing one HiddenField control to keep count of the node no. before each post back occurs so as to track through the child nodes in the XML file.

protected void Page_Load(object sender, EventArgs e)
if (!IsPostBack)
Int32 j = 0;
Hidint.Value = Convert.ToString(j);

private int increment()
string strInput = Hidint.Value;
int incrValue = Convert.ToInt32(strInput);
incrValue += 1;
Hidint.Value = incrValue.ToString();
return incrValue;


protected void btnShow4mXML_Click(object sender, EventArgs e)
DataSet ds = new DataSet();
Int32 i = increment();
DataTable dt = ds.Tables[0];
if (i <= dt.Rows.Count)
DataRow dr;
dr = dt.Rows[i-1];
txtName.Text = dr["name"].ToString();
txtEmail.Text = dr["email"].ToString();
txtComment.Text = dr["comment"].ToString();
Label1.Text = dr["comment"].ToString();
btnShow4mXML.Enabled = false;

Thursday, March 27, 2008

Good People Do have Good Looks Too :)
"The race of mankind would perish did they cease to aid each other. We cannot exist without mutual help. All therefore that need aid have a right to ask it from their fellow-men; and no one who has the power of granting can refuse it without guilt."