Search This Blog

Wednesday, October 27, 2010

Business Intelligence (BI)

Business Intelligence is the data warehousing and reporting. Where the original concept of data warehousing is primarily concerned with the integration of vast amounts of data across multiple business systems, business intelligence technologies help to gather, analyze, and provide access to that integrated store of data in order to make informed strategic business decisions.
Business intelligence technologies to track business performance, detect trends, and produce accurate forecasts about the future, businesses hope to turn their wealth of corporate data into a competitive advantage. Where strategic business decisions 100 years ago were largely made by guesswork, business intelligence systems help to eliminate the guesswork by providing much more insight into past performance and more accurate predictions of the future conditions. This high-quality information can actually be targeted at any level of an organization, although most use cases involve upper management.
 
The Report Center : The Report Center site provides a central location for business-intelligence-related information. It contains special document libraries for storing reports, lists, and connections to external data sources.


Excel Services: Excel Services provides to store an Excel workbook on a server and publish any part of that workbook on a Web page. Users need only a browser to view and interact with the live data. The workbook is published on the Web page by using the Excel Web Access (EWA) Web Part.
 
Key Performance Indicators (KPIs) : A Key Performance Indicator (KPI) is a visual cue that communicates the amount of progress made toward a goal. KPIs are valuable for teams, managers, and businesses to evaluate quickly the progress made against measurable goals.
 
Connections to external data sources : In addition to using external data sources in Excel workbooks, you can use data from other business applications, such as SAP and Siebel, in SharePoint lists, pages, and Web Parts.
 
Filter Web Parts : Filters allows display only the subset of data that user interested in viewing. For example, a data set can contain ten years' record's of multiple products for the entire country/city. By using filters, user can display something more meaningful, such as only one sales region, only one product, or only the current year.
 
Dashboards : Dashboards are tools that are used to communicate status and to drive action. An Office SharePoint Server 2007 dashboard is a Web page template that allows you to assemble and display information from disparate sources such as reports, charts, metrics, and key performance indicators.

Microsoft Office SharePoint Server (MOSS)

Microsoft Office SharePoint Server (MOSS or OSS) comes in two versions: Standard Edition and Enterprise Edition. Standard Edition is a Microsoft product built upon WSS. MOSS extends Windows Sharepoint Services (WSS) with functionality for web content management (WCM), records management (RM), integrated digital rights management (DRM), workflows, Single Sign-On (SSO), document retention and auditing policies, expanded search including People Search, and site variations to ease the maintenance of multilingual sites.

MOSS also provides a My Site for each user, with both a private view for storing personal information and a public view to share photos, personal information, and more.
MOSS includes additional templates and services, enables portal-wide searching, and provides document control workflow templates. This product is sold through Microsoft Volume Licensing. MOSS is the server product.

There are Standard and Enterprise editions of MOSS. The Enterprise edition includes these additional services: InfoPath Forms Services, Excel Services, and Business Data Catalog. If you choose MOSS, you’ll be talking to a salesperson anyway, so he or she should be able to help you choose based on your needs and budget. All of the MOSS editions include WSS 3.0.

Purchase MOSS if you are building an enterprise portal. In addition to search, full MOSS includes workflow templates for document control, action menus, records repository, personalized sites (My Sites), audiences (targeted content), listings (content expiration), and compliance policies. If you need those things, MOSS is well worth the cost.


Windows SharePoint Services (WSS)

Windows Sharepoint Services (WSS) version 3.0 (WSS v3) offers developers an immense set of features that can be leveraged to customize and extend its out-of-the-box functionality.
Windows SharePoint Services is a versatile technology in Microsoft Windows Server™ 2003 that organizations and business units of all sizes can use to help increase the efficiency of business processes and improve team productivity. With tools for collaboration that help people stay connected across organizational and geographic boundaries, Windows SharePoint Services gives people access to the information they need.

Built on Windows Server 2003, Windows SharePoint Services also provides a foundation platform for building Web-based business applications that can flex and scale easily to meet the changing and growing needs of your business. Robust administrative controls for managing storage and Web infrastructure give IT departments a cost-effective way to implement and manage a high-performance collaboration environment. With a familiar, Web-based interface and with the ability to work smoothly with everyday tools including those available in the 2007 Microsoft Office system, Windows SharePoint Server is easy to use and can be deployed rapidly.

WSS pages are ASP.NET applications, and SharePoint web parts use the ASP.NET web parts infrastructure, and using the ASP.NET APIs, web parts can be written to extend the functionality of WSS. In terms of programmability, WSS exposes an API and object model to programmatically create and manage portals, workspaces and users. In contrast, the MOSS API is more geared towards automation of tasks and integration with other applications.

Both Windows Sharepoint Services (WSS) and Microsoft Office Sharepoint Server (MOSS) can use the web parts API to enhance the end user functionality. In addition, WSS document libraries can be exposed over ADO.NET connections to programmatically access the files and revisions in them.

Set color in calender cell.

using System;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Drawing;
public partial class Webadmin_Atendence_view : System.Web.UI.Page
{
    datautl dut = new datautl();
    protected void Page_Load(object sender, EventArgs e)
    {
      
    }
    protected void Calendar1_Load(object sender, EventArgs e)
    {
    }
    //***********************************day render create cell load time*************************************************************
    #region DayRender
    protected void Calendar1_DayRender(object sender, DayRenderEventArgs e)
    {
        if (!e.Day.IsOtherMonth)
        {
            //Response.Write(DateTime.Now.Month.ToString());
            int Fmonth = e.Day.Date.Month;
            string Enroll = "123abcd";
            string sql = "select * from Giip_Atendence where Amonth=" + Fmonth + " and EnrollNo='" + Enroll.ToString() + "'";
            SqlDataReader dr = dut.ExecuteReader(sql);
            //Convert.ToInt32(DateTime.Now.Month);
            //Response.Write(Fmonth);
            //Response.End();
            //Response.Write(Enroll);
            //Response.Write(sql);
            //dr.Read();
            //****************************dr.read returm true or false value*******************************************
            if (dr.Read())
            {
                int i;
                for (i = 1; i <= 31; i++)
                {
                    if (e.Day.Date.Day == i)
                    {
                        if (dr["D" + i].ToString() == "1")
                        {
                            e.Cell.BackColor = Color.Green;
                        }
                        else if (dr["D" + i].ToString() == "0")
                        {
                            e.Cell.BackColor = Color.Red;
                        }
                        else if (dr["D" + i].ToString() == "2")
                        {
                            e.Cell.BackColor = Color.Yellow;
                        }
                        else
                        {
                            e.Cell.BackColor = Color.White;
                        }
                    }
                }
            }
         
        }
        else
        { e.Cell.Text = ""; }
    }
    #endregion
}

Create Dropdown List For Year in C#

code for create LI one object for showing year with increment.

#region BINDYEAR
    private void BINDYEAR()
    {
        try
        {
            int A = 1800;
            for (int i = 0; i < 20; i++)
            {
                ListItem LI = new ListItem();
                LI.Text = Convert.ToInt16(A).ToString();
                LI.Value = A.ToString();
                A=A+1;
                ddl_year.Items.Add(LI);
            }
            ddl_year.Items.Insert(0, "YYYY");
              
        }
        catch (Exception errmsg)
        {
            Response.Write(errmsg.Message.ToString());
        }
    }
    #endregion

Code for Shadow in text C#

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register TagPrefix="custom" Namespace="mycontrols" %>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
   
<div>
<custom:DropShadow id="Dropshadow1"
Text="an application with bug is like Soup with a fly."
Font-Size="30px"
runat="Server" />
</div>

    </form>
</body>
</html>


using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
/// <summary>
/// Summary description for DropShadow
/// </summary>
namespace mycontrols
{
    public class DropShadow:WebControl
    {
        private string _Text;
        public string Text
        {
            get { return _Text; }
            set { _Text = value; }
        }
        protected override void RenderContents(HtmlTextWriter writer)
        {
            writer.AddStyleAttribute(HtmlTextWriterStyle.Filter, "dropshadow(color=red,offX=3,offY=3);width:300px");
            writer.RenderBeginTag(HtmlTextWriterTag.Div);
            writer.Write(_Text);
            writer.RenderEndTag();
        }


        public DropShadow()
        {
            //
            // TODO: Add constructor logic here
            //
        }
    }
}

How can show Random value on page uesing with Array in C#

using System;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class RandomBook : System.Web.UI.UserControl
{
    datautl dut = new datautl();
    string[] queries = new string[6];
    int count1;
   
    protected void Page_Load(object sender, EventArgs e)
    {
        random();
        Random1();
       
    }
    #region randombook
    void random()
    {
        string myData = string.Empty;
      
        string strSql1 = "select count(sno) from B_Book";
        SqlDataReader drcount1 = dut.ExecuteReader(strSql1);
        if (drcount1.HasRows)
        {
            drcount1.Read();
            count1 = Convert.ToInt32(drcount1[0]);
        }
        Random randnum = new Random();
        //myData = myData + "<table width='100%' border='0' align='center' cellpadding='0' cellspacing='0' style='position: relative'  bgcolor='#E5E5E5'>";
        //myData = myData + "<tbody>";
        for (int i = 0; i < 6; i++)
        {
            int num = randnum.Next(1, count1);
           
            queries[i] = "select B_Book.*,B_Category.category as category,B_Category.sno as sno1 from B_Book,B_Category where B_Book.sno = " + num + " and  B_Category.sno=B_Book.Cat_id";
            //string strSqlques = "select B_Book.*,B_Category.category as category,B_Category.sno as sno1 from B_Book,B_Category where B_Book.sno = " + num + " and  B_Category.sno=B_Book.Cat_id";
            //SqlDataReader dr = dut.ExecuteReader(strSqlques);
            //    if (dr.Read())
            //        {
            //         myData = myData + "<tr>";
            //         myData = myData + "<td class='bookname' height='4'><div align='left'></td>";
            //         myData = myData + "</tr>";
            //         myData = myData + "<tr>";
            //         myData = myData + "<td height='4'class='grey1'><a href='Book_Details.aspx?H=1&ID=" + dr["sno"] + "&AID=" + dr["Author_1"] + "&Catname=" + dr["category"] + "' class='grey1'><strong>" + dr["Book_name"] + "</strong></a></td>";
            //         //myData = myData + "<td height='4'class='grey1'><a href='Book_Details.aspx?ID=" + dr["sno"] + "&AID=" + dr["Author_1"] + "&Catname=" + dr["category"] + "'><img src = 'UploadData/" + dr["Book_Image"].ToString() + "' width='100' height='162' border='0'><strong>" + dr["Book_name"].ToString() + "</strong></a></td>";
            //         myData = myData + "</tr>";
            //         myData = myData + "<tr>";
            //         myData = myData + "<td valign='top'><div align='left'>";
            //         myData = myData + "<table cellspacing='0' cellpadding='0' width='100%' border='0'>";
            //         myData = myData + "<tbody>";
            //         myData = myData + "<tr>";
            //         myData = myData + "<td valign='top' width='90' align='center'>";
            //         myData = myData + "<img src='UploadData/"+ dr["Book_Image"]+"' width='100' height='150' /></td>";
            //         myData = myData + "<td class='grey' valign='top'><br />";
            //         myData = myData + "</td>";
            //         myData = myData + "</tr>";
            //         myData = myData + "</tbody>";
            //         myData = myData + "</table>";
            //         myData = myData + "</div></td>";
            //         myData = myData + "</tr>";
            //         myData = myData + "<tr>";
            //         myData = myData + "  <td class='red' height='5'><div align='left'><U></U><strong></strong></div></td>";
            //         myData = myData + "</tr>";
            //     }
                //dr.Close();
           }
            //  myData = myData + "</tbody>";
            //  myData = myData + "</table>";
            // myLabel.InnerHtml = myData;
           //Response.Write(queries[0].ToString());
       // }
        }
    #endregion
  //******************************Random book1********************************************************
    private void Random1()
    {
        string str1 = queries[0].ToString();
        DataSet ds1 = new DataSet();
        ds1 = dut.Display(str1);
        ddl_listR1.DataSource = ds1;
        ddl_listR1.DataBind();
        string str2 = queries[1].ToString();
        DataSet ds2 = new DataSet();
        ds2 = dut.Display(str2);
        ddl_listR2.DataSource = ds2;
        ddl_listR2.DataBind();
        string str3 = queries[2].ToString();
        DataSet ds3 = new DataSet();
        ds3 = dut.Display(str3);
        ddl_listR3.DataSource = ds3;
        ddl_listR3.DataBind();
        string str4 = queries[3].ToString();
        DataSet ds4 = new DataSet();
        ds4 = dut.Display(str4);
        ddl_listR4.DataSource = ds4;
        ddl_listR4.DataBind();
        string str5 = queries[4].ToString();
        DataSet ds5 = new DataSet();
        ds5 = dut.Display(str5);
        ddl_listR5.DataSource = ds5;
        ddl_listR5.DataBind();
        string str6 = queries[5].ToString();
        DataSet ds6 = new DataSet();
        ds6 = dut.Display(str6);
        ddl_listR6.DataSource = ds6;
        ddl_listR6.DataBind();
      
    }
   
     
     //*************************************************************************************
   
}

Tuesday, October 26, 2010

Fetch data from tables when Database are different or DB server same.

select * from  test1.dbo.[table_1]
union all
select * from  test2.dbo.[table_1]

In this query test1 and test2 these are two different database on same server and using table table_1 & table_2 all fields are same by this query we are fetching all data from both tables.

Wednesday, October 20, 2010

Membership Class Properties in asp.net

Membership Class Properties

1-passwordAttemptWindow —> I want to lock out a user after 5 failed password attempts with no
Password attempt window. Meaning after 5 bad attempts, the account is locked until an administrator
unlocks the account.
2-ApplicationName—> Gets and sets an optional string to identify the application.
3-EnablePasswordReset—> Returns true if the provider supports password reset.
4-EnablePasswordRetrieval—> Returns true if the provider supports password retrieval.
5-HashAlgorithmType —> Returns a string representing the hash algorithm that will be used for
passwords, assuming that the feature has been configured to use hashing.
6-MaxInvalidPasswordAttempts —> Returns the maximum number of invalid password attempts
allowed before the user is locked out.
7-MinRequiredNonAlphanumericCharacters —> Returns the minimum number of punctuation
characters required in the password.
8-MinRequiredPasswordLength —> Returns the minimum required length for a password.
9-PasswordAttemptWindow —> Returns the time window for failed password attempts. If the
maximum number of invalid password or password answer attempts is exceeded within this time
interval (in minutes), the user is locked out.
10-PasswordStrengthRegularExpression —> Returns the regular expression with which the password
must comply.
11-Provider —> Returns an instance of the currently configured provider.
12-Providers —> Returns the collection of all registered providers.
13-RequiresQuestionAndAnswer —> Returns true if the provider requires a password question/answer
when retrieving or resetting the password.
14-UserIsOnlineTimeWindow —> Specifies the time window, in minutes, for which the user is
considered to be online after user activity.

Membership Class Shared Methods

1-CreateUser —> Creates a new user and fails if the user already exists.
2-DeleteUser —> Deletes the user corresponding to the specified name.
3-FindUsersByEmail —> Returns a collection of membership users whose e-mail address matches the
specified e-mail address.
4-FindUsersByName —> Returns a collection of membership users whose user name matches the
5-GeneratePassword —>Generates a random password of the specified length.
6-GetAllUsers —> collection of all users.
7-GetNumberOfUsersOnline —> Returns the total number of users currently online.
8-GetUser —> Retrieves the MembershipUser object associated with the current or specified user.
9-GetUserNameByEmail —> Obtains the user name that corresponds to the specified e-mail address.
This method assumes that the e-mail address is a unique identifier in the user database.
10-UpdateUser —> Takes a MembershipUser object and updates the information stored for the user.
11-ValidateUser —> Authenticates a user using supplied credentials.

cross page posting in c#

<%@ Page Language=”C#” AutoEventWireup=”true” CodeBehind=”next1.aspx.cs” Inherits=”WEBJOB.next1″ %>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd“>
<html xmlns=”http://www.w3.org/1999/xhtml” >
<head runat=”server”>
    <title>Untitled Page</title>
</head>
<body>
    <form id=”form1″ runat=”server”>
    <div>
  
        <asp:Label ID=”Label1″ runat=”server” Text=”Label”></asp:Label>
  
    </div>
    </form>
</body>
</html>
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
namespace WEBJOB
{
    public partial class next1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (PreviousPage != null)
            {
                Page poster = this.PreviousPage;
                Label1.Text = ((TextBox)this.PreviousPage.FindControl(“txtname”)).Text;
             
            }
          
          
        
        }
    }
}

Difference bettween web form and web content form in asp.net 2008

Web form is nothing but normal .aspx page. When you create web form you see all tags such as <head>,
<body>, <html> etc.

Master page is nothing but a common page which holds a common content so that you can use it across
multiple pages. That means if you want to display menu on 3-4 pages, you can write the code into
master page and use it on all pages. This way you don’t have to write same code again and again on all
3-4 pages.

This is also another type of form which exists with master page, Basically content page is the page which
holds un-common content where master page contains common content among lets say 3-4 pages. You
get <asp:content> tag in this type of paSoolutiom In a normal website, you create a content page by
ticking the “Select Masterpage” checkbox when adding a page. For Web Application Projects, you need
to select Web Content Form to create a content page and a Web Form to add a normal (no masterpage)
page
  • —-> In a normal website, you create a content page by ticking the “Select Masterpage” checkbox when
adding a page. For Web Application Projects, you need to select Web Content Form to create a content
page and a Web Form to add a normal (no masterpage) page..
  • —-> Web content is the textual, visual or aural content that is encountered as part of the user
    experience on websites.It may include, among other things: text, images, sounds, videos and
    animations.

State Management in ASP.Net

There are two major categories of the above :

1. Server-Side State Management
2. Client-Side State Management

1. Server-Side State Management:-
Session State
ASP.NET application object
Types of Cache
.NET remoting
Static variables

2. Client-Side State Management:-
Cookies
ViewState
Hidden fields
Query Strings
Control State