infomakc technology

infomakc technology webdevelopment and software development Experis IT is the global leader in professional resourcing and project-based workforce and business solutions.

We accelerate organizations' growth by intensely assessing and placing specialized expertise in IT to precisely deliver in-demand talent for mission-critical initiatives and provide anticipatory application solutions to help businesses cut across market clutter and stay ahead of competition.

12/10/2017

R&D

15/02/2014

JavaScript Convert 12 Hour AM/PM Time to 24 Hours Time Format

Introduction:

Here I will explain how to use JavaScript to convert 12 hours AM / PM time to 24 hours time format using JavaScript or JavaScript convert AM/PM time to 24 hour time.



To implement this we need to write the code like as shown below




JavaScript Convert AM/PM to 24 Hours Time

function Converttimeformat() {
// var time = $(" ").val();
var time = document.getElementById('txttime').value;
var hrs = Number(time.match(/^(\d+)/)[1]);
var mnts = Number(time.match(/:(\d+)/)[1]);
var format = time.match(/\s(.*)$/)[1];
if (format == "PM" && hrs < 12) hrs = hrs + 12;
if (format == "AM" && hrs == 12) hrs = hrs - 12;
var hours = hrs.toString();
var minutes = mnts.toString();
if (hrs < 10) hours = "0" + hours;
if (mnts < 10) minutes = "0" + minutes;
alert(hours + ":" + minutes);
}






Enter Time:









15/02/2014

JavaScript Character Key Codes| KeyBoard Keys Codes JavaScript

Introduction:

Here I will explain JavaScript character key codes or keyboard keys codes in JavaScript or alphabet keycodes in JavaScript or alphabet character codes or number character codes or special characters key codes or the character code value of the key pressed or released.

Check below table for character code value of the key pressed or released

KeyBoard Character Key Codes
Backspace = 8

Tab = 9

Enter = 13

Shift = 16
Ctrl = 17

Alt = 18

CapsLock = 20

Esc = 27

Spacebar = 32

PageUp = 33

PageDown = 34

End = 35

Home = 36

LeftArrow = 37

UpArrow = 38

RightArrow = 39

DownArrow = 40

Insert = 45

Delete = 46

NumLock = 144

ScrLk = 145

Pause/Break = 19

A or a = 65

B or b = 66

C or c = 67

D or d = 68
E or e = 69

F or f = 70

G or g = 71

H or h = 72

I or i = 73

J or j = 74

K or k = 75

L or l = 76

M or m = 77

N or n = 78

O or o = 79

P or p = 80

Q or q = 81

R or r = 82

S or s = 83

T or t = 84

U or u = 85

V or v = 86

W or w = 87

X or x = 88

Y or y = 89

Z or z = 90

0 = 48

1 = 49

2 = 50

3 = 51
4 = 52

5 = 53

6 = 54

7 = 55

8 = 56

9 = 57

; or : = 186

= or + = 187

- or _ = 189

/ or ? = 191

` or ~ = 192

[ or { = 219

\ or | = 220

] or } = 221

" or ' = 222

, = 188
= 190

/ = 191

Numpad 0 = 96

Numpad 1 = 97

Numpad 2 = 98

Numpad 3 = 99

Numpad 4 = 100

Numpad 5 = 101

Numpad 6 = 102

Numpad 7 = 103
Numpad 8 = 104

Numpad 9 = 105

Numpad Multiply = 106

Numpad Add = 107

Numpad Enter = 13

Numpad Subtract = 109

Numpad Decimal = 110

Numpad Divide = 111

F1 = 112

F2 = 113

F3 = 114

F4 = 115

F5 = 116

F6 = 117

F7 = 118

F8 = 119

F9 = 120

F10 = no key

F11 = 122

F12 = 123

F13 = 124

F14 = 125

F15 = 126

06/11/2013

this page is about web and programs

webdevelopment and software development

06/11/2013

Main aim of the Property View to provide valued housing plots in and around Chennai and other places of Tamilnadu. The registered office of the company in Chennai.

06/11/2013

Move Selected Gridview Rows to Another Gridview in Asp.net:

To implement this first we need to write the code in aspx page like this



Tranfer selected gridview rows to another gridview in Asp.net



















Second Gridview Data













Now add following namespaces in codebehind

C # Code

using System;
using System.Data;
using System.Web.UI.WebControls;
After that add following code in code behind

protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BindGridview();
BindSecondGrid();
}
}
protected void BindGridview()
{
DataTable dt = new DataTable();
dt.Columns.Add("UserId", typeof(Int32));
dt.Columns.Add("UserName", typeof(string));
dt.Columns.Add("Education", typeof(string));
dt.Columns.Add("Location", typeof(string));
DataRow dtrow = dt.NewRow(); // Create New Row
dtrow["UserId"] = 1; //Bind Data to Columns
dtrow["UserName"] = "SureshDasari";
dtrow["Education"] = "B.Tech";
dtrow["Location"] = "Chennai";
dt.Rows.Add(dtrow);
dtrow = dt.NewRow(); // Create New Row
dtrow["UserId"] = 2; //Bind Data to Columns
dtrow["UserName"] = "MadhavSai";
dtrow["Education"] = "MBA";
dtrow["Location"] = "Nagpur";
dt.Rows.Add(dtrow);
dtrow = dt.NewRow(); // Create New Row
dtrow["UserId"] = 3; //Bind Data to Columns
dtrow["UserName"] = "MaheshDasari";
dtrow["Education"] = "B.Tech";
dtrow["Location"] = "Nuzividu";
dt.Rows.Add(dtrow);
gvDetails.DataSource = dt;
gvDetails.DataBind();
}
protected void chkSelect_CheckChanged(object sender, EventArgs e)
{
GetSelectedRows();
BindSecondGrid();
}
protected void BindSecondGrid()
{
DataTable dt = (DataTable)ViewState["GetRecords"];
gvTranferRows.DataSource = dt;
gvTranferRows.DataBind();
}
private void GetSelectedRows()
{
DataTable dt;
if (ViewState["GetRecords"] != null)
dt = (DataTable)ViewState["GetRecords"];
else
dt = CreateTable();
for (int i = 0; i < gvDetails.Rows.Count; i++)
{
CheckBox chk = (CheckBox)gvDetails.Rows[i].Cells[0].FindControl("chkSelect");
if (chk.Checked)
{
dt = AddGridRow(gvDetails.Rows[i], dt);
}
else
{
dt = RemoveRow(gvDetails.Rows[i], dt);
}
}
ViewState["GetRecords"] = dt;
}
private DataTable CreateTable()
{
DataTable dt = new DataTable();
dt.Columns.Add("UserId");
dt.Columns.Add("UserName");
dt.Columns.Add("Education");
dt.Columns.Add("Location");
dt.AcceptChanges();
return dt;
}
private DataTable AddGridRow(GridViewRow gvRow, DataTable dt)
{
DataRow[] dr = dt.Select("UserId = '" + gvRow.Cells[1].Text + "'");
if (dr.Length 0)
{
dt.Rows.Remove(dr[0]);
dt.AcceptChanges();
}
return dt;
}
VB.NET Code

Imports System.Data
Imports System.Web.UI.WebControls
Partial Class VBCode
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
If Not IsPostBack Then
BindGridview()
BindSecondGrid()
End If
End Sub
Protected Sub BindGridview()
Dim dt As New DataTable()
dt.Columns.Add("UserId", GetType(Int32))
dt.Columns.Add("UserName", GetType(String))
dt.Columns.Add("Education", GetType(String))
dt.Columns.Add("Location", GetType(String))
Dim dtrow As DataRow = dt.NewRow()
' Create New Row
dtrow("UserId") = 1
'Bind Data to Columns
dtrow("UserName") = "SureshDasari"
dtrow("Education") = "B.Tech"
dtrow("Location") = "Chennai"
dt.Rows.Add(dtrow)
dtrow = dt.NewRow()
' Create New Row
dtrow("UserId") = 2
'Bind Data to Columns
dtrow("UserName") = "MadhavSai"
dtrow("Education") = "MBA"
dtrow("Location") = "Nagpur"
dt.Rows.Add(dtrow)
dtrow = dt.NewRow()
' Create New Row
dtrow("UserId") = 3
'Bind Data to Columns
dtrow("UserName") = "MaheshDasari"
dtrow("Education") = "B.Tech"
dtrow("Location") = "Nuzividu"
dt.Rows.Add(dtrow)
gvDetails.DataSource = dt
gvDetails.DataBind()
End Sub
Protected Sub chkSelect_CheckChanged(ByVal sender As Object, ByVal e As EventArgs)
GetSelectedRows()
BindSecondGrid()
End Sub
Protected Sub BindSecondGrid()
Dim dt As DataTable = DirectCast(ViewState("GetRecords"), DataTable)
gvTranferRows.DataSource = dt
gvTranferRows.DataBind()
End Sub
Private Sub GetSelectedRows()
Dim dt As DataTable
If ViewState("GetRecords") IsNot Nothing Then
dt = DirectCast(ViewState("GetRecords"), DataTable)
Else
dt = CreateTable()
End If
For i As Integer = 0 To gvDetails.Rows.Count - 1
Dim chk As CheckBox = DirectCast(gvDetails.Rows(i).Cells(0).FindControl("chkSelect"), CheckBox)
If chk.Checked Then
dt = AddGridRow(gvDetails.Rows(i), dt)
Else
dt = RemoveRow(gvDetails.Rows(i), dt)
End If
Next
ViewState("GetRecords") = dt
End Sub
Private Function CreateTable() As DataTable
Dim dt As New DataTable()
dt.Columns.Add("UserId")
dt.Columns.Add("UserName")
dt.Columns.Add("Education")
dt.Columns.Add("Location")
dt.AcceptChanges()
Return dt
End Function
Private Function AddGridRow(ByVal gvRow As GridViewRow, ByVal dt As DataTable) As DataTable
Dim dr As DataRow() = dt.[Select]("UserId = '" & gvRow.Cells(1).Text & "'")
If dr.Length 0 Then
dt.Rows.Remove(dr(0))
dt.AcceptChanges()
End If
Return dt
End Function
End Class

06/11/2013

Get Gridview Row Values When Checkbox Selected in Asp.net:

To get checkbox selected row values from gridview we need to write the code like this

C # Code

foreach(GridViewRow gvrow in gvDetails.Rows)
{
CheckBox chk = (CheckBox)gvrow.FindControl("chkSelect");
if (chk != null & chk.Checked)
{
str += gvDetails.DataKeys[gvrow.RowIndex].Value.ToString() + ',';
strname += gvrow.Cells[2].Text+',';
}
}
VB.NET Code

For Each gvrow As GridViewRow In gvDetails.Rows
Dim chk As CheckBox = DirectCast(gvrow.FindControl("chkSelect"), CheckBox)
If chk IsNot Nothing And chk.Checked Then
str += gvDetails.DataKeys(gvrow.RowIndex).Value.ToString() + ","c
strname += gvrow.Cells(2).Text & ","c
End If
Next
If you want to see complete example we need to write the following code in aspx page



Get Checkbox Selected Row Values from Gridview in Asp.net
























Now in code behind add the following namespaces

C # Code

using System;
using System.Data;
using System.Data.SqlClient;
using System.Web.UI.WebControls;
Now add below code in code behind

protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BindGridviewData();
}
}
protected void BindGridviewData()
{
DataTable dt = new DataTable();
dt.Columns.Add("UserId", typeof(Int32));
dt.Columns.Add("UserName", typeof(string));
dt.Columns.Add("Education", typeof(string));
dt.Columns.Add("Location", typeof(string));
DataRow dtrow = dt.NewRow(); // Create New Row
dtrow["UserId"] = 1; //Bind Data to Columns
dtrow["UserName"] = "SureshDasari";
dtrow["Education"] = "B.Tech";
dtrow["Location"] = "Chennai";
dt.Rows.Add(dtrow);
dtrow = dt.NewRow(); // Create New Row
dtrow["UserId"] = 2; //Bind Data to Columns
dtrow["UserName"] = "MadhavSai";
dtrow["Education"] = "MBA";
dtrow["Location"] = "Nagpur";
dt.Rows.Add(dtrow);
dtrow = dt.NewRow(); // Create New Row
dtrow["UserId"] = 3; //Bind Data to Columns
dtrow["UserName"] = "MaheshDasari";
dtrow["Education"] = "B.Tech";
dtrow["Location"] = "Nuzividu";
dt.Rows.Add(dtrow);
gvDetails.DataSource = dt;
gvDetails.DataBind();
}
protected void btnProcess_Click(object sender, EventArgs e)
{
string str = string.Empty;
string strname = string.Empty;
foreach(GridViewRow gvrow in gvDetails.Rows)
{
CheckBox chk = (CheckBox)gvrow.FindControl("chkSelect");
if (chk != null & chk.Checked)
{
str += gvDetails.DataKeys[gvrow.RowIndex].Value.ToString() + ',';
strname += gvrow.Cells[2].Text+',';
}
}
str= str.Trim(",".ToCharArray());
strname = strname.Trim(",".ToCharArray());
lblmsg.Text = "Selected UserIds: " + str + "" + "Selected UserNames: " + strname+"";
}
VB.NET Code

Imports System.Data
Imports System.Data.SqlClient
Imports System.Web.UI.WebControls
Partial Class VBCode
Inherits System.Web.UI.Page
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not IsPostBack Then
BindGridviewData()
End If
End Sub
Protected Sub BindGridviewData()
Dim dt As New DataTable()
dt.Columns.Add("UserId", GetType(Int32))
dt.Columns.Add("UserName", GetType(String))
dt.Columns.Add("Education", GetType(String))
dt.Columns.Add("Location", GetType(String))
Dim dtrow As DataRow = dt.NewRow()
' Create New Row
dtrow("UserId") = 1
'Bind Data to Columns
dtrow("UserName") = "SureshDasari"
dtrow("Education") = "B.Tech"
dtrow("Location") = "Chennai"
dt.Rows.Add(dtrow)
dtrow = dt.NewRow()
' Create New Row
dtrow("UserId") = 2
'Bind Data to Columns
dtrow("UserName") = "MadhavSai"
dtrow("Education") = "MBA"
dtrow("Location") = "Nagpur"
dt.Rows.Add(dtrow)
dtrow = dt.NewRow()
' Create New Row
dtrow("UserId") = 3
'Bind Data to Columns
dtrow("UserName") = "MaheshDasari"
dtrow("Education") = "B.Tech"
dtrow("Location") = "Nuzividu"
dt.Rows.Add(dtrow)
gvDetails.DataSource = dt
gvDetails.DataBind()
End Sub
Protected Sub btnProcess_Click(sender As Object, e As EventArgs)
Dim str As String = String.Empty
Dim strname As String = String.Empty
For Each gvrow As GridViewRow In gvDetails.Rows
Dim chk As CheckBox = DirectCast(gvrow.FindControl("chkSelect"), CheckBox)
If chk IsNot Nothing And chk.Checked Then
str += gvDetails.DataKeys(gvrow.RowIndex).Value.ToString() + ","c
strname += gvrow.Cells(2).Text & ","c
End If
Next
str = str.Trim(",".ToCharArray())
strname = strname.Trim(",".ToCharArray())
lblmsg.Text = "Selected UserIds: " & str & "" & "Selected UserNames: " & strname & ""
End Sub
End Class

06/11/2013

Introduction to Object Oriented Programming Concepts (OOPS) in C #.net:

Class:

It is a collection of objects.

Object:

It is a real time entity.
An object can be considered a "thing" that can perform a set of related activities. The set of activities that the object performs defines the object's behavior. For example, the hand can grip something or a Student (object) can give the name or address. In pure OOP terms an object is an instance of a class

The above template describe about object Student
Class is composed of three things name, attributes, and operations

public class student
{
}
student objstudent=new student ();

According to the above sample we can say that Student object, named objstudent, has created out of the student class.

In real world you will often find many individual objects all of the same kind. As an example, there may be thousands of other bicycles in existence, all of the same make and model. Each bicycle has built from the same blueprint. In object-oriented terms, we say that the bicycle is an instance of the class of objects known as bicycles. In the software world, though you may not have realized it, you have already used classes. For example, the Textbox control, you always used, is made out of the Textbox class, which defines its appearance and capabilities. Each time you drag a Textbox control, you are actually creating a new instance of the Textbox class.

Encapsulation:

Encapsulation is a process of binding the data members and member functions into a single unit.

Example for encapsulation is class. A class can contain data structures and methods.
Consider the following class

public class Aperture
{
public Aperture ()
{
}
protected double height;
protected double width;
protected double thickness;
public double get volume()
{
Double volume=height * width * thickness;
if (volume

Address

Chennai
600112

Telephone

8122503409

Website

Alerts

Be the first to know and let us send you an email when infomakc technology posts news and promotions. Your email address will not be used for any other purpose, and you can unsubscribe at any time.

Contact The Business

Send a message to infomakc technology:

Share