Showing posts from June, 2014

Who is connected to database - Sample Application C#

This is a sample application just to show who is currently connected into database MSSQL. The application actually just execute MSSQL command " sp_who " and show the data into datagrid. Below is a screen shoot of the sample application. Code Behind View Who Is Connected Form          public Form1()         {             InitializeComponent();         }         private void button2_Click(object sender, EventArgs e)         {             this.Close();         }         private void button1_Click(object sender, EventArgs e)         {             string ipaddress = textBox1.Text;             string username = textBox2.Text;             string password = textBox3.Text;             string dbNAme = textBox4.Text;             ViewUserActive form = new ViewUserActive();             form.popupInformation(ipaddress, username, password, dbNAme);                }         private void Form1_Load(object sender, EventArgs e)         {                  } Code Behind ViewUserActive Form      

Kentico 7 - Get Specific document information

This post will show how to get specific document information using Transformation In Kentico 7. Note : i have tested this method in kentico 7 only, donno if the other version will work. You can refer this link to create new transformation method Example : You can use this method in your transformation let say you create new repeater and want to show the parent name of the binding document type data. In this scenario, the document type store under different parent node.        public string getDocumentInfo(string documentID, string parentProperties)         {             TreeProvider tree = new CMS.DocumentEngine.TreeProvider(CMSContext.CurrentUser);             TreeNode Node = DocumentHelper.GetDocument(Convert.ToInt16(documentID), tree);             if (Node != null)             {                 switch (parentProperties)                 {                     case "NodeID": return Node.NodeID.ToString();                     case "NodeAliasPath": return Node.NodeAli