serving the solutions day and night

Pages

Showing posts with label xml. Show all posts
Showing posts with label xml. Show all posts

Saturday, January 12, 2013

MS Dynamics CRM Web Resources

Web resources are virtual files that are stored in the CRM database and that you can retrieve by using a unique URL address. Solution -> Entities -> Web Resource

Limitations of Web Resources
Web resource does not supports ASP.NET(.aspx or asmx) page to execute code on the server. Web resources are either static files or files with code that is processed client-side by the browser.

Web resources are only available by using the CRM web application security context. Only licensed CRM users who have the necessary privileges can access them.

Size Limitations - The maximum size of files that can be uploaded is determined by the Organization.MaxUploadFileSize property.
Settings -> System -> Administration -> System Settings -> E-mail tab -> Maximum file size (default 5 mb). This setting limits the size of files that can be attached to email messages, notes, and web resources.
Web Resource Properties - Name, Display Name, Description, Type, Language


Thursday, November 29, 2012

SharePoint 2010 - Create List, Update Document, Link to Other List using c#

This post contains mostly c# code. Code contains to create/update List, folder, link to other list and update word document.

using Microsoft.SharePoint.Client;

namespace CreateReportForPlacesV2
{
    public class SharePoint
    {
        // Defines a private SharePoint site, like "http://<Server Name>/"
        private string spSite = System.Configuration.ConfigurationManager.AppSettings["SPSite"].ToString();

        // Defines a private SharePoint document, like "Reporting Documents".
        private string spDoc = System.Configuration.ConfigurationManager.AppSettings["SPReportingDocument"].ToString();

        // Defines a private SharePoint place list name, like "Place Details".
        private string spPList = System.Configuration.ConfigurationManager.AppSettings["SPPlaceDetailsList"].ToString();

        // Defines a private SharePoint C list is used to link to Place list details.
        private string spCList = System.Configuration.ConfigurationManager.AppSettings["SPCList"].ToString();


Monday, November 26, 2012

CRM Dynamics 2011 - Dynamic Entity

Using C# and IOrganizationService Web Service - A Simple Application will display, add, modify and delete Entity records.

Form design

<div>
        <strong>Contact Form - <asp:Button ID="Insert" runat="server" OnClick="Insert_Click" Text="Insert" /><br /></strong>
        <asp:Literal ID="litViewAll" runat="server"></asp:Literal><br />
        <asp:Panel runat="server" ID="panDetails" Visible="false">
        First Name<asp:TextBox ID="txtFirstName" runat="server"></asp:TextBox><br />
        Last Name<asp:TextBox ID="txtLastName" runat="server"></asp:TextBox><br />
        Address<asp:TextBox ID="txtAddress" runat="server"></asp:TextBox><br />
        City<asp:TextBox ID="txtCity" runat="server"></asp:TextBox><br />
        Zip<asp:TextBox ID="txtZip" runat="server"></asp:TextBox><br />
        State<asp:DropDownList ID="ddlSList" runat="server" AppendDataBoundItems="true">
            <asp:ListItem Selected="True" Text="Select SList" Value="00000000-0000-0000-0000-000000000000"/>
        </asp:DropDownList><br />
        Municipality Name<asp:DropDownList ID="ddlJList" runat="server" AppendDataBoundItems="true">
            <asp:ListItem Selected="True" Text="Select MList" Value="00000000-0000-0000-0000-000000000000"/>
        </asp:DropDownList><br/>      
        <asp:Button ID="CreateNew" runat="server" OnClick="CreateNew_Click" Text="Create" />
        <asp:Button ID="Delete" runat="server" OnClick="Delete_Click" Text="Delete" />
        <asp:Button ID="Update" runat="server" OnClick="Update_Click" Text="Update" /><br />
        </asp:Panel>
        </div>

Wednesday, August 24, 2011

Matrix Report using SQL Server XML and XSLT Code

Desiging Matrix Report using SQL Server XML, XSLT and JAVA Code
In the above matrix report image is grouped week by employee vs employee by week.
Part 1 - SQL CODE
DECLARE @depart_id int
DECLARE @startdate datetime
DECLARE @enddate DATETIME

SET @depart_id = 314
SET @startdate = '01/01/2001'
SET @enddate = '02/28/2001'

DECLARE @e_id int
DECLARE @ename varchar(100)
Creating temporary table

Tuesday, August 9, 2011

XSLT Pagination and For Loop Code

For Loop 1 - 10
<xsl:call-template name="forloop">
  <xsl:with-param name="i"><xsl:value-of select="count(ts/@weekenddate)+1"/></xsl:with-param>
  <xsl:with-param name="count"><xsl:value-of select="$totalweekend"/></xsl:with-param>
</xsl:call-template>

<xsl:template name="forloop">
  <xsl:param name="i" />
  <xsl:param name="count" />
  <xsl:if test="$i <= $count"><TD align="center"> </TD></xsl:if>

  <xsl:if test="$i <= $count">
    <xsl:call-template name="for.loop">
      <xsl:with-param name="i">
        <xsl:value-of select="$i + 1"/>
      </xsl:with-param>
      <xsl:with-param name="count">
        <xsl:value-of select="$count"/>
      </xsl:with-param>
    </xsl:call-template>
  </xsl:if>
</xsl:template>

Pagination

Monday, September 27, 2010

Java Naming and Directory Interface (JNDI) with Environment Variables

The environment allows you to define your variables name, value and type. At runtime the environment values are not allowed to modify.

Declared the environment variables using the <env-entry> tag in the deployment descriptor (WEB-INF/web.xml in Tomcat). The elements of the <env-entry> tag are:
* <description>: an optional description.
* <env-entry-name>: the entry name.
* <env-entry-value>: a value.
* <env-entry-type>: the java variable type(Boolean, Byte, Double, Character, Float, Integer, Long, Short, String).

Wednesday, August 25, 2010

How to configuring a SQL Server datasource in Apache Tomcat using Java Naming and Directory Interface (JNDI) InitialContext Program?

Download the latest sql server database driver and place it into the lib folder. Restart Tomcat server, once the below changes are done.

1. web.xml configuration
Go to Tomcat root directory -> then explore webapps directory -> select cos (i.e., it is your project folder) and finally select WEB-INF folder. Open web.xml file, if not one, then create web.xml configuration file. Add the below code after <web-app> root tag.

Monday, June 14, 2010

AJAX, Send XML Request/Response Using ASP.NET ,C# - Part 4

What is Ajax - More detail read Ajax Blog
1)Ajax are HTML, DOM, CSS, XML, JavaScript and XMLHttpRequest.
2)Submit Request and Get Server Response without doing page refresh.
3)Do the Asynchronous call to the server and get response from it.

This blog is going to explain
1)Send a XML request from Ajax to ASP.NET using C#.
2)Receive a XML Response from ASP.NET using C#to Ajax.


View Sequence Diagram for AJAX
View AJAX Flow Diagram

Friday, June 11, 2010

AJAX, Send XML Request/Response Using PHP XML DOM - Part 3

I blogged What Ajax is and higher-level codes, let's put all together and example for send XML request/response using Ajax enabled PHP application.

Here i explain 2 application of XML.
1)To send a request from a Ajax to a PHP in XML format.
2)To receive a response from a PHP in Ajax in XML format.

Tuesday, June 8, 2010

AJAX, Send/Receive XML Request/Response using JAVA - Part 2

I blogged What Ajax is and higher-level codes, let's put all together and example for send XML request/response using Ajax enabled Java application.

Sequence Diagram for AJAX Using JAVA

Saturday, May 29, 2010

Ajax (Asynchronous JavaScript and XML) - Part 1

Ajax is to update the web page, using data fetched from the server/internet, without reloading the whole page in the browser.  

Friday, April 23, 2010

C# Questions

struct vs Class
  • structs are value types that can contain data and functions
  • structs are value types and do not require heap allocation.
  • structs directly store their data in the struct, classes store a reference to a dynamically allocated object.
  • structs are useful for small data structures
  • structs can affect performance
  • Constructors are invoked with the new operator, but that does not allocate memory on the heap
  • A struct constructor simply returns the struct value itself (typically in a temporary location on the stack), and this value is then copied as necessary
  • With classes, multiple variables may have a reference to the same object
  • It is possible for operations on one variable to affect the object referenced by the other variable.
  • With structs, the variables each have their own copy of the data, and it is not possible for operations on one to affect the other.
  • structs do not support user-specified inheritance, and they implicitly inherit from type object
Public struct PointStruct
{
 public int x;
 public int y;

 public PointStruct(int x, int y)
 {
  this.x = x;
  this.y = y;
 }
}

static void Main(string[] args)
{
 PointStruct ps = new PointStruct();
 ps.x = 10;
 ps.y = 10;
 Console.WriteLine(“Initial struct values are “ + ps.x +”, “+ ps.y);
 ModifyStructPoint(ps);
 Console.WriteLine(“After ModifyStructPoint, struct values are “ + ps.x +”, “+ ps.y);
}

void ModifyStructPoint(PointStruct newStruct)
{
 newStruct.x = 20;
 newStruct.y = 20;
 Console.WriteLine(“Inside ModifyStructPoint()”);
 Console.WriteLine(“Modified values are “ + newStruct.x +”, “+ newStruct.y);
}

Initial struct values are 10,10
Inside ModifyStructPoint()
Modified values are 20,20
After ModifyStructPoint, struct values are 10,10
class PointClass
{
 public int x;
 public int y;

 public PointClass(int x, int y)
 {
 this.x = x;
 this.y = y;
 }
}

static void Main(string[] args)
{
 PointClass pc = new PointClass(10,10);
 Console.WriteLine(“Initial class values are “ + pc.x +”, “+ pc.y);
 ModifyClassPoint(pc);
 Console.WriteLine(“After ModifyClassPoint, class are “ + ps.x +”, “+ ps.y);
}

void ModifyClassPoint(PointStruct newPoint)
{
 newPoint.x = 20;
 newPoint y = 20;
 Console.WriteLine(“Inside ModifyClassPoint()”);
 Console.WriteLine(“Modified values are “ + newPoint.x +”, “+ newPoint.y);
}

Initial class values are 10,10
Inside ModifyClassPoint()
Modified values are 20,20
After ModifyClassPoint, struct values are 20,20

Tuesday, April 6, 2010

XSL Code

1)Starting (From Database)
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="NewDataSet">
ALL CODE ARE GOING HERE
</xsl:template>
</xsl:stylesheet>