Friday 27 February 2015

Difference between properties and attributes

The Difference between an Attribute and a Property To add or provide an additional perspective;
An Attribute is a descriptor of the Class (Class as opposed to instances or objects of the class) and are common/exists in, and of, all created instances of the class
whereas
A Property offers variance among instances/objects of the class.
For example, use an automobile as the class and think of different instances of an automobile:
Attributes: (these exist in all instances/cars)
1. 4 Wheels (hopefully!)
2. Headlights
3. Engine
4. Seats
Properties: (these allow variances in each instance/object)
1. Color [ Blue | Red | Grey ]
2. Rear Spoiler [ True | False ]
3. Engine Bore [ 5.7L | 5.0L ]
4. Seat Style: [ Leather | Cloth | Vinyl ]

Wednesday 25 February 2015

XML Schema Definition Tool (Xsd.exe)

Create any XML
Generate xsd using xml. Rfe: http://www.freeformatter.com/xsd-generator.html#ad-output
Now open Visual Studio Command Prompt 2010 Administration mode.
Type xsd
you should get all help..
C:\WINDOWS\system32>xsd C:\Users\Admin\Documents\Test\My.xsd /c /out:C:\Users\Admin\Documents\Test

Outlook Backup

  • Click the File tab.
  • In the Outlook Options window, click Advanced.
  • Click Export.
  • In the Import and Export Wizard, click Export to a file, and then click Next.
  • Click Outlook Data File (.pst), and then click Next.
  • Select the folder to export, and then click Next.
  • Click Browse, and then select the location where you want the new .pst file to be saved.
  • In the File Name box, type the name that you want to use for the new .pst file, and then click OK.
  • Click Finish

Monday 23 February 2015

C# XML Serialization and Deserialization

1.Create a Asp.Net web application.
2.Add a web page.
3.Add new xml file.
<?xml version="1.0" encoding="utf-8"?>
<CarCollection>
<Cars>
<Car>
<StockNumber>1020</StockNumber>
<Make>Nissan</Make>
<Model>Sentra</Model>
</Car>
<Car>
<StockNumber>1010</StockNumber>
<Make>Toyota</Make>
<Model>Corolla</Model>
</Car>
<Car>
<StockNumber>1111</StockNumber>
<Make>Honda</Make>
<Model>Accord</Model>
</Car>
</Cars>
</CarCollection>
Add above code in xml.
Now generate methods and properties for xml file using XML Schema Definition Tool (Xsd.exe)
Now open Visual Studio Command Prompt 2010 Administration mode.
Type xsd
you should get all help..
Generate the xsd file from xml, using below command.
C:\WINDOWS\system32>xsd C:\Users\Admin\Documents\Test\MyCars.xml
Generate the C# class file using below command.
C:\WINDOWS\system32>xsd C:\Users\Admin\Documents\Test\MyCars.xsd /c /out:C:\Users\Admin\Documents\Test
You will get MyCars.cs file under C:\Users\Admin\Documents\Test
Add MyCars.cs to your solution.
Build..should be no errors
In the webpage add button under button click write below code..
protected void btnCar_Click(object sender, EventArgs e)
{
CarCollection cars = null;
string path = "C:\\Users\\Admin\\Documents\\Visual Studio 2013\\Projects\\Testxml\\Testxml\\MyCars.xml";
XmlSerializer serializer = new XmlSerializer(typeof(CarCollection));
StreamReader reader = new StreamReader(path);
cars = (CarCollection)serializer.Deserialize(reader);
string strModel = cars.Items[0].Car[0].Model;
//You can read all properties....using for loop
//Start
CarCollection myCars = null;
using (XmlReader myReader = XmlReader.Create(path))
{
myCars = (CarCollection)serializer.Deserialize(myReader);
}
//End
}

Full code.....


Bulk File name change using powershell

First create ps.ps1 file and add below code.
Get-ChildItem -Filter "*New*" -Recurse | Rename-Item -NewName {$_.name -replace 'New','ooo' }
Now create a filenamechange.bat
add below code.
Powershell.exe -executionpolicy remotesigned -File  C:\Users\Admin\Documents\Test\ps.ps1
Now place 2 above files and your source files under C:\Users\Admin\Documents\Test
Run batch file.

Monday 9 February 2015

K2 for SharePoint Tutorials: Expense Claim Approval Build


https://www.youtube.com/watch?v=wKDwTdaqF0A#t=13
https://www.youtube.com/watch?v=Osi0KZYaNvY
https://www.youtube.com/watch?v=svgcXXjXZeY
https://www.youtube.com/watch?v=veKKjJoUhuc
https://www.youtube.com/watch?v=y9uBxcZhVH8
https://www.youtube.com/watch?v=9bT6vpDO02M
https://www.youtube.com/watch?v=KhKhyX7WYAI

https://www.youtube.com/channel/UCe_842WPzxlDKgxquIa-eKg

Thursday 5 February 2015

Windows Server 2012 Add new Administrator Account

Go to Control Panel
Click on User Accounts
Click on User Accounts
Click on Manage Another Account
Click on Add a user account
Enter Account name and password
Finish
Click on your new account.
Click on "Change the account type"
Select "Administrator"
Click on "Change account type"

Disable IE Enhanced security configuration

First: It is not recommended to disable ie enhanced security configuration.
Second: Don’t use a web browser on a server.

Still if you want to use IE in server and disable ie enhanced security configuration.
Follow below steps..
Click on Server Manager. (You will find Server Manager icon after start icon)
Click on Local Server.
You will find : IE Enhanced Security Configuration
By default this one will be : On
Click On link: "On"
In the prompt, Select "Off" for admin and users.
Click Ok.


Monday 2 February 2015

IaaS PaaS SaaS

If you are working with Azure related projects, you will here....IaaS PaaS SaaS...
You will get confused about IaaS PaaS SaaS..
I will try to explain IaaS PaaS SaaS

IaaS : Infrastructure as a service
You will buy Infrastructure, mean you will buy Server, then you will install whatever you want. You can install Your Operating System, then you will install your software .Net, JAVA, SAP, SharePoint... any thing.  You cab deploy any application based on your OS and software installation.

PaaS :Platform as a service
You will buy one platform, mean you will get Server with pre installed operating system installed and pre installed software. No need to install any OS or any Software, you will get built in.
You can deploy your applications based on platform.

SaaS :Software as a Service
Everything will be service, if you want to use any software, you have to pay money for service based on usage and based on type service. You can't install any software. If you want to write a document, you need Office software, you have to take service of Office.

Example...