Here we go:
select sum(isnull(rejectedcount,0)) as RejectedCount,AssignedtoCW from smotaskmaster where AssignedtoCW is not null group by AssignedtoCW;
select count(*) as Approved, AssignedtoCW from smotaskmaster where (approvedbysmo=1 and approvedbyseo=1) and AssignedtoCW is not null group by AssignedtoCW;
select count(*) as Worked, AssignedtoCW from smotaskmaster where AssignedtoCW is not null and lengthcontentdesccw is not null group by AssignedtoCW;
select count(*) as pending, AssignedtoCW from smotaskmaster where (approvedbysmo=0 or approvedbyseo=0) and AssignedtoCW is not null group by AssignedtoCW;
I have tried so many thing but it doesn't work in the last finally it works for me :-
Select AssignedtoCW,sum(isnull(rejectedcount,0)) as RejectedCount,
Approved=(select count(*) from smotaskmaster where (approvedbysmo=1 and approvedbyseo=1) AND SMM.AssignedtoCW =AssignedtoCW),
Worked=(select count(*) from smotaskmaster where AssignedtoCW=SMM.AssignedtoCW and lengthcontentdesccw is not null),
Pending=(select count(*) as pending from smotaskmaster where (approvedbysmo=0 or approvedbyseo=0) AND SMM.AssignedtoCW =AssignedtoCW )
From smotaskmaster SMM WHERE
SMM.AssignedtoCW is not null group by AssignedtoCW
above query is given for your help you can modify your queries like this.....
ASP.NET is a web application framework developed and marketed by Microsoft to allow programmers to build dynamic web sites, web applications and web services. It was first released in January 2002 with version 1.0 of the .NET Framework, and is the successor to Microsoft's Active Server Pages (ASP) technology. ASP.NET is built on the Common Language Runtime (CLR), allowing programmers to write ASP.NET code using any supported .NET language.
Monday, March 11, 2013
Saturday, February 2, 2013
Custom domain in blogger
Login Blogger Click Setting -->Basic --> in publishing click + Add a custom domain--> if you have already a domain then click on Switch to advanced settings under Advanced settings fill
To resolved this issue go to go-daddy control panel which look like this DNS amanager --> Edit Zone under the domain name
After this edit the www and add new recored with the second cname. then save in blogger it will work within in few hours.
To resolved this issue go to go-daddy control panel which look like this DNS amanager --> Edit Zone under the domain name
After this edit the www and add new recored with the second cname. then save in blogger it will work within in few hours.
Thursday, January 31, 2013
Plot Marker on Google map form excel sheet
Plot Marker on Google map form excel sheet
Below the .aspx code
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default3.aspx.cs" Inherits="Default3" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!DOCTYPE html>
<html>
<head>
<%-- Google api --%>
<script src="http://maps.google.com/maps/api/js?sensor=false"
type="text/javascript"></script>
</head>
<body>
<div id="map" style="width: 1290px; height: 570px;"></div>
<script type="text/javascript">
<%=Locations %>
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 3,
center: new google.maps.LatLng(28.692997,77.233429),
mapTypeId: google.maps.MapTypeId.ROADMAP
});
var infowindow = new google.maps.InfoWindow();
var marker, i;
for (i = 0; i < locations.length; i++) {
marker = new google.maps.Marker({
position: new google.maps.LatLng(locations[i][1], locations[i][2]),
map: map
});
google.maps.event.addListener(marker, 'click', (function(marker, i) {
return function() {
infowindow.setContent(locations[i][0]);
infowindow.open(map, marker);
}
})(marker, i));
}
</script>
</body>
</html>
Note : -
<%=Locations %> here is code represent the lat ,long and adresses of location which is gerated from code behind page i.e dynamically.
For simple static Google map you can replace the
<%=Locations %> by
var locations = [ ['9043, Malviya Nagar', 28.548338, 77.213287,1], ['Road No :1, Banjara Hills', 17.4126362, 78.4502041,2], ['Near Clock Tower, Market Street', 17.5169711, 78.5150626,3];
Format of Location : -
['address', lat, lon,ID]
for static google map no need of code behind page.
Code behind page
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;
using System.IO;
using System.Data.OleDb;
public partial class Default3 : System.Web.UI.Page
{
string OledbConnectionString;
public string Desc;
public double lat;
public double lon;
public string GoogleAPIKey;
public int ZoomLevel;
public String Locations;
protected void Page_Load(object sender, EventArgs e)
{
// Excel 2007
string location = Server.MapPath("~/Excel/") + ConfigurationManager.AppSettings["filename"].ToString().Trim();
ZoomLevel = Int32.Parse("10");
OledbConnectionString = string.Empty;
// Get extension of excel file
string ext = Path.GetExtension(ConfigurationManager.AppSettings["filename"].ToString().Trim());
if (ext == ".xls")
{
OledbConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + location + ";Extended Properties=Excel 8.0;";
}
else if (ext == ".xlsx")
{
OledbConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + location + ";Extended Properties=Excel 12.0;";
}
else
{ }
try
{
OleDbConnection objConn = null;
objConn = new OleDbConnection(OledbConnectionString);
if (objConn.State == ConnectionState.Closed)
{
objConn.Open();
}
OleDbDataAdapter da = new OleDbDataAdapter("select Latitude as [Lat], Longitude as [Long] ,Address as [Address] from [Sheet2$]", objConn);
//Latitude Longitude Address
DataSet ds = new DataSet();
da.Fill(ds);
DataTable dt = ds.Tables[0];
lat = 24.20689;
lon = 78.046875;
int i = 0;
Locations = "var locations = [";
foreach (DataRow dr in dt.Rows)
{
i++;
if (dr["lat"].ToString().Trim() != "")
{
Locations += Environment.NewLine + "['" + dr["Address"].ToString().Trim().Replace("/", "").Replace("'", "").Replace("\n", "").Replace("@", "").Replace("&", "") + "', " + dr["Lat"].ToString().Trim() + ", " + dr["Long"].ToString().Trim() + "," + i + "],";
//
}
if (i == 1200)
{
break;
}
}
Locations = Locations.Substring(0, Locations.Length - 1);
Locations +="];";
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
}
}
Put appsetting in webconfingWebconfig
Note : - put hospital.xlsx file in excel folder.....file having three column adress ,latitude, longitude
<appSettings>
<add key="class" value="server=.;database=Hcl;uid=sa;pwd=sa123"/>
<add key="filename" value="hospital.xlsx"/>
</appSettings>
Monday, January 28, 2013
Online Website security check tool
- http://safeweb.norton.com/ Is This Website Safe | Website Security | Norton Safe Web - Check your website for virus.
- http://www.siteadvisor.com/
McAfee SiteAdvisor software is a free browser plug-in that provides simple Web site safety ratings and a Secure Search box so you can surf, search and shop more safely. - http://www.google.com/safebrowsing/diagnostic?site=malwarehelp.org Just replace malwarehelp.org with your given site to check what happen when google visited that site.
- http://www.mywot.com/ Check the reputation of your website.
- http://www.unmaskparasites.com
Hackers exploit security vulnerabilities in popular web software such as blogs, forums, CMS, image galleries and wikis to insert hidden illicit content into web pages of innocent third-party web sites. - http://wepawet.iseclab.org Wepawet is a service for detecting and analyzing web-based threats. It currently handles Flash, JavaScript, and PDF files
- http://hosts-file.net/ hpHosts is a community managed and maintained hosts file that allows an additional layer of protection against access to ad, tracking and malicious websites.
- http://onlinelinkscan.com/ Online Virus Scanner - Check websites for Malware & Viruses Before you Visit.
Wednesday, January 23, 2013
Visual Studio Short cut
General
| Shortcut | Description |
| Ctrl-X or Shift-Delete | Cuts the currently selected item to the clipboard |
| Ctrl-C or Ctrl-Insert | Copies the currently selected item to the clipboard |
| Ctrl-V or Shift-Insert | Pastes the item in the clipboard at the cursor |
| Ctrl-Z or Alt-Backspace | Undo previous editing action |
| Ctrl-Y or Ctrl-Shift-Z | Redo the previous undo action |
| Ctrl-Shift-V or Ctrl-Shift-Insert | Pastes an item from the clipboard ring tab of the Toolbox at the cursor in the file and automatically selects the pasted item. Cycle through the items on the clipboard by pressing the shortcut keys repeatedly |
| Esc | Closes a menu or dialog, cancels an operation in progress, or places focus in the current document window |
| Ctrl-S | Saves the selected files in the current project (usually the file that is being edited) |
| Ctrl-Shift-S | Saves all documents and projects |
| Ctrl-P | Displays the Print dialog |
| F7 | Switches from the design view to the code view in the editor |
| Shift-F7 | Switches from the code view to the design view in the editor |
| F8 | Moves the cursor to the next item, for example in the TaskList window or Find Results window |
| Shift-F8 | Moves the cursor to the previous item, for example in the TaskList window or Find Results window |
| Shift-F12 | Finds a reference to the selected item or the item under the cursor |
| Ctrl-Shift-G | Opens the file whose name is under the cursor or is currently selected |
| Ctrl-/ | Switches focus to the Find/Command box on the Standard toolbar |
| Ctrl-Shift-F12 | Moves to the next task in the TaskList window |
| Ctrl-Shift-8 | Moves backward in the browse history. Available in the object browser or Class View window |
| Alt-Left Arrow | Go back in the web browser history |
| Alt-Right Arrow | Go forward in the web browser history |
Text navigation
| Shortcut | Description |
| Left Arrow | Moves the cursor one character to the left |
| Right Arrow | Moves the cursor one character to the right |
| Down Arrow | Moves the cursor down one line |
| Up Arrow | Moves the cursor up one line |
| Page Down | Scrolls down one screen in the editor window |
| Page Up | Scrolls up one screen in the editor window |
| End | Moves the cursor to the end of the current line |
| Home | Moves the cursor to the beginning of the line. If you press Home when the cursor is already at the start of the line, it will toggle the cursor between the first non-whitespace character and the real start of the line |
| Ctrl-End | Moves the cursor to the end of the document |
| Ctrl-Home | Moves the cursor to the start of the document |
| Ctrl-G | Displays the Go to Line dialog. If the debugger is running, the dialog also lets you specify addresses or function names to go to |
| Ctrl-] | Moves the cursor to the matching brace in the document. If the cursor is on an opening brace, this will move to the corresponding closing brace and vice versa |
| Ctrl-K, Ctrl-N | Moves to the next bookmark in the document |
| Ctrl-K, Ctrl-P | Moves to the previous bookmark |
| Ctrl-K, Ctrl-I | Displays Quick Info, based on the current language |
| Ctrl-Down Arrow | Scrolls text down one line but does not move the cursor. This is useful for scrolling more text into view without losing your place. Available only in text editors |
| Ctrl-Up Arrow | Scrolls text up one line but does not move the cursor. Available only in text editors |
| Ctrl-Right Arrow | Moves the cursor one word to the right |
| Ctrl-Left Arrow | Moves the cursor one word to the left |
| Ctrl-Shift-1 | Navigates to the next definition, declaration, or reference of an item. Available in the object browser and Class View window. Also available in source editing windows if you have already used the Edit.GoToReference (Shift-F12) shortcut |
| Ctrl-Shift-2 | Navigates to the previous definition, declaration, or reference of an item |
Text manipulation
| Shortcut | Description |
| Enter | Inserts a new line |
| Delete | Deletes one character to the right of the cursor |
| Insert | Toggles between insert and overtype insertion modes |
| Tab | Indents the currently selected line or lines by one tab stop. If there is no selection, this inserts a tab stop |
| Shift-Tab | Moves current line or selected lines one tab stop to the left |
| Backspace or Shift-Backspace | Deletes one character to the left of the cursor |
| Ctrl-K, Ctrl-C | Marks the current line or selected lines of code as a comment, using the correct comment syntax for the programming language |
| Ctrl-K, Ctrl-U | Removes the comment syntax from the current line or currently selected lines of code |
| Ctrl-T or Shift-Enter | Swaps the characters on either side of the cursor. (For example, AC|BD becomes AB|CD.) Available only in text editors |
| Ctrl-K, Ctrl-L | Removes all unnamed bookmarks in the current document |
| Ctrl-M, Ctrl-O | Automatically determines logical boundaries for creating regions in code, such as procedures, and then hides them. This collapses all such regions in the current document |
| Alt-Right Arrow or Ctrl-Spacebar | Displays statement completion based on the current language or autocompletes word if existing text unambiguously identifies a single symbol |
| Ctrl-K, Ctrl-\ | Removes horizontal whitespace in the selection or deletes whitespace adjacent to the cursor if there is no selection |
| Ctrl-K, Ctrl-F | Applies the indenting and space formatting for the language as specified on the Formatting pane of the language in the Text Editor section of the Options dialog to the selected text. |
| Ctrl-L | Cuts all selected lines or the current line if nothing has been selected to the clipboard |
| Ctrl-Shift-L | Deletes all selected lines or the current line if no selection has been made |
| Ctrl-Enter | Inserts a blank line above the cursor |
| Ctrl-Shift-Enter | Inserts a blank line below the cursor |
| Shift-Alt-T | Moves the line containing the cursor below the next line |
| Ctrl-J | Lists members for statement completion when editing code |
| Ctrl-U | Changes the selected text to lowercase characters |
| Ctrl-Shift-U | Changes the selected text to uppercase characters |
| Ctrl-Shift-Spacebar | Displays a tooltip that contains information for the current parameter, based on the current language |
| Ctrl-M, Ctrl-U | Removes the outlining information for the currently selected region |
| Ctrl-M, Ctrl-P | Removes all outlining information from the entire document |
| Ctrl-R, Ctrl-P | Swaps the anchor and endpoint of the current selection |
| Ctrl-M, Ctrl-L | Toggles all previously marked hidden text sections between hidden and display states |
| Ctrl-K, Ctrl-K | Sets or removes a bookmark at the current line |
| Ctrl-M, Ctrl-M | Toggles the currently selected hidden text section or the section containing the cursor if there is no selection between the hidden and display states |
| Ctrl-K, Ctrl-H | Sets or removes a shortcut in the tasklist to the current line |
| Ctrl-R, Ctrl-R | Enables or disables word wrap in an editor |
| Ctrl-R, Ctrl-W | Shows or hides spaces and tab marks |
| Ctrl-Delete | Deletes the word to the right of the cursor |
| Ctrl-Backspace | Deletes the word to the left of the cursor |
| Ctrl-Shift-T | Transposes the two words that follow the cursor. (For example, |End Sub would be changed to read Sub End|.) |
| Ctrl-.[dot] | Display options on smarttag menu. Very useful for showing using/Imports options. |
Subscribe to:
Posts (Atom)

