16,004,686 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Bharath Kumar Gorle (Top 24 by date)
Bharath Kumar Gorle
22-Jul-13 1:18am
View
Sry dudes... I dont what we call it as..the buttons that are there to go back...opening the menu in android...
Bharath Kumar Gorle
18-Jul-13 1:32am
View
Thank you, for ur answer, Here the thing is I have to drag and drop an image any location on the screen..You gave some sites links those are working to drag and drop to another layout but not the same layout and that to i am having the code but it is working only for absolute layout not for another layout...
Bharath Kumar Gorle
16-Jul-13 2:34am
View
http://androidrox.wordpress.com/2011/05/13/android-sample-app-drag-and-drop-image-using-touch/
I used this code...It is working for only absolute layout...i would like to go for another layout...
Bharath Kumar Gorle
11-Jul-13 3:21am
View
1234567890123456
1234567890123456
1234567890123456
three strings i want the op as
121212343434565656..........
Bharath Kumar Gorle
10-Jul-13 3:07am
View
By using FileReader we can read the file..But i am not getting the exact result..could you pls help me...
Bharath Kumar Gorle
9-Jul-13 7:05am
View
ok Thanq for ur info
Bharath Kumar Gorle
9-Jul-13 6:14am
View
kk..Thanq
Bharath Kumar Gorle
9-Jul-13 6:10am
View
it will diff for diff sys or not..???
Bharath Kumar Gorle
9-Jul-13 6:05am
View
Sry for this...My question is how to find the OS key...Not the registration or serial key...I that is something we call product ID
Bharath Kumar Gorle
9-Jan-13 7:37am
View
form2
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using DevComponents.DotNetBar;
using DevComponents.DotNetBar.Controls;
using DevComponents.DotNetBar.Rendering;
namespace Employee_Management
{
public partial class Form6 : Office2007Form
{
string combovalue;
private void Form6_Load(object sender, EventArgs e)
{
}
public Form6()
{
InitializeComponent();
}
public Form6(string str1)
{
this.combovalue = str1;
}
ViewDetails f7 = new ViewDetails();
private void GetDa()
{
//f7.fors
}
static SqlConnection con = new SqlConnection("Data Source=NAROLIS-1-PC;Initial Catalog=emp_mgmt;Persist Security Info=True;User ID=sa;Password=Narolis");
static SqlDataAdapter da = new SqlDataAdapter("select * from salary2", con);
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
if (comboBox1.SelectedIndex >= 0)
{
if (comboBox1.SelectedIndex == 0)
{
styleManager1.ManagerStyle = eStyle.Office2007Blue;
RibbonPredefinedColorSchemes.ChangeOffice2007ColorTable(eOffice2007ColorScheme.Blue);
}
else if (comboBox1.SelectedIndex == 1)
{
styleManager1.ManagerStyle = eStyle.Office2007Silver;
RibbonPredefinedColorSchemes.ChangeOffice2007ColorTable(eOffice2007ColorScheme.Silver);
}
else if (comboBox1.SelectedIndex == 2)
{
styleManager1.ManagerStyle = eStyle.Office2007Black;
RibbonPredefinedColorSchemes.ChangeOffice2007ColorTable(eOffice2007ColorScheme.Black);
}
else
{
styleManager1.ManagerStyle = eStyle.Office2007VistaGlass;
RibbonPredefinedColorSchemes.ChangeOffice2007ColorTable(eOffice2007ColorScheme.VistaGlass);
}
}
}
#region UserMethods
#region DataBasesInGrid
public void sal(string refid)
{
string str = "select * from salary2 where refid = '" + refid + "'";
SqlConnection con = new SqlConnection("Data Source=NAROLIS-1-PC;Initial Catalog=emp_mgmt;Persist Security Info=True;User ID=sa;Password=Narolis");
SqlDataAdapter da = new SqlDataAdapter(str, con);
DataTable dt = new DataTable();
dt.Clear();
da.Fill(dt);
if (dt.Rows.Count > 0)
dataGridView1.DataSource = dt;
else
MessageBox.Show("Database is not pakka....");
//DataTable dt = GetDt(str);
//VerticalGrid(dt);
//return dt;
}
public void Perform(string refid)
{
string str = "select * from performance where refid = '" + refid + "'";
DataTable dt = GetDt(str);
dataGridView1.DataSource = dt;
//VerticalGrid(dt);
}
public void Daily(string refid)
{
string str = "select * from dailywork where refid = '" + refid + "'";
DataTable dt = GetDt(str);
VerticalGrid(dt);
}
#endregion
#region Grid
private void VerticalGrid(DataTable dt)
{
// Creating a table for to display in a Vertical manner
DataTable table = new DataTable();
//Get the Number of rows to make new column
for (int i = 0; i <= dt.Rows.Count; i++)
table.Columns.Add(Con
Rep
Bharath Kumar Gorle
9-Jan-13 7:37am
View
form1
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Imaging;
using System.Text;
using System.Windows.Forms;
using DevComponents.DotNetBar;
using System.Data.SqlClient;
using System.Configuration;
using System.IO;
namespace Employee_Management
{
public partial class ViewDetails : DevComponents.DotNetBar.Metro.MetroForm
{
byte[] byteImg;
public ViewDetails()
{
InitializeComponent();
}
DataSet ds = new DataSet();
private void Form7_Load(object sender, EventArgs e)
{
// TODO: This line of code loads data into the 'emp_mgmtDataSet1.employee' table. You can move, or remove it, as needed.
this.employeeTableAdapter1.Fill(this.emp_mgmtDataSet1.employee);
// TODO: This line of code loads data into the 'emp_mgmtDataSet.employee' table. You can move, or remove it, as needed.
this.employeeTableAdapter.Fill(this.emp_mgmtDataSet.employee);
foreach (var ctrl in this.Controls)
if (ctrl is TextBox)
(ctrl as TextBox).ReadOnly = true;
}
#region Button_Click_Events
private void button1_Click(object sender, EventArgs e)
{
button3.Visible = true;
textBox14.Visible = true;
foreach (var ctrl in this.Controls)
{
if (ctrl is TextBox)
(ctrl as TextBox).ReadOnly = false;
}
}
private void button2_Click(object sender, EventArgs e)
{
string str = "update employee set fname ='" + textBox1.Text + "',lname ='" + textBox2.Text + "' ,email = '" + textBox4.Text + "',mobile = '" + textBox5.Text + "',college ='" + textBox6.Text + "',collegelocation ='" + textBox7.Text + "',fathername ='" + textBox8.Text + "',nationality='" + textBox9.Text + "',dob='" + textBox10.Text + "',gender ='" + textBox11.Text + "',currentaddress = '" + textBox12.Text + "',permanentaddress ='" + textBox13.Text + "',photo= @photo,experience ='" + textBox15.Text + "',currentindustry='" + textBox16.Text + "',domain = '" + textBox17.Text + "',keyskills ='" + textBox18.Text + "' where refid = '" + comboBox1.SelectedValue +"'";
SqlConnection con = new SqlConnection("Data Source=NAROLIS-1-PC;Initial Catalog=emp_mgmt;Persist Security Info=True;User ID=sa;Password=Narolis");
SqlCommand cmd = new SqlCommand(str, con);
byte[] byteImg;
if (pictureBox1.Image != null)
{
MemoryStream ms = new MemoryStream();
pictureBox1.Image.Save(ms, ImageFormat.Jpeg);
byteImg = new byte[ms.Length];
ms.Position = 0;
ms.Read(byteImg, 0, byteImg.Length);
cmd.Parameters.AddWithValue("@photo", byteImg);
}
con.Open();
int n = cmd.ExecuteNonQuery();
con.Close();
if (n > 0)
{
MessageBox.Show("The employee " + comboBox1.SelectedValue + "Hasbeen Modified");
}
else
MessageBox.Show("Upadation failed");
txtclear();
}
private void button3_Click(object sender, EventArgs e)
{
OpenFileDialog open = new OpenFileDialog();
open.Filter = "Image Files(*.jpg; *.jpeg; *.gif; *.bmp)|*.jpg; *.jpeg; *.gif; *.bmp";
if (open.ShowDialog() == DialogResult.OK)
{
pictureBox1.Image = new Bitmap(open.FileName);
textBox14.Text = open.FileName;
}
}
private void button4_Click(object sender, EventArgs e)
{
string str = comboBox1.SelectedValue.ToString();
//Form6 f6 = n
Bharath Kumar Gorle
9-Jan-13 7:30am
View
Even though it is showing the same error....
Bharath Kumar Gorle
9-Jan-13 7:13am
View
If you have any doubts ask me... i wil tell...
Bharath Kumar Gorle
9-Jan-13 6:56am
View
Deleted
From2 Code
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using DevComponents.DotNetBar;
using DevComponents.DotNetBar.Controls;
using DevComponents.DotNetBar.Rendering;
namespace Employee_Management
{
public partial class Form6 : Office2007Form
{
string combovalue;
private void Form6_Load(object sender, EventArgs e)
{
}
public Form6()
{
InitializeComponent();
}
public Form6(string str1)
{
this.combovalue = str1;
}
ViewDetails f7 = new ViewDetails();
private void GetDa()
{
//f7.fors
}
static SqlConnection con = new SqlConnection("Data Source=NAROLIS-1-PC;Initial Catalog=emp_mgmt;Persist Security Info=True;User ID=sa;Password=Narolis");
static SqlDataAdapter da = new SqlDataAdapter("select * from salary2", con);
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
if (comboBox1.SelectedIndex >= 0)
{
if (comboBox1.SelectedIndex == 0)
{
styleManager1.ManagerStyle = eStyle.Office2007Blue;
RibbonPredefinedColorSchemes.ChangeOffice2007ColorTable(eOffice2007ColorScheme.Blue);
}
else if (comboBox1.SelectedIndex == 1)
{
styleManager1.ManagerStyle = eStyle.Office2007Silver;
RibbonPredefinedColorSchemes.ChangeOffice2007ColorTable(eOffice2007ColorScheme.Silver);
}
else if (comboBox1.SelectedIndex == 2)
{
styleManager1.ManagerStyle = eStyle.Office2007Black;
RibbonPredefinedColorSchemes.ChangeOffice2007ColorTable(eOffice2007ColorScheme.Black);
}
else
{
styleManager1.ManagerStyle = eStyle.Office2007VistaGlass;
RibbonPredefinedColorSchemes.ChangeOffice2007ColorTable(eOffice2007ColorScheme.VistaGlass);
}
}
}
#region UserMethods
#region DataBasesInGrid
public void sal(string refid)
{
string str = "select * from salary2 where refid = '" + refid + "'";
SqlConnection con = new SqlConnection("Data Source=NAROLIS-1-PC;Initial Catalog=emp_mgmt;Persist Security Info=True;User ID=sa;Password=Narolis");
SqlDataAdapter da = new SqlDataAdapter(str, con);
DataTable dt = new DataTable();
dt.Clear();
da.Fill(dt);
if (dt.Rows.Count > 0)
dataGridView1.DataSource = dt;
else
MessageBox.Show("Database is not pakka....");
//DataTable dt = GetDt(str);
//VerticalGrid(dt);
//return dt;
}
public void Perform(string refid)
{
string str = "select * from performance where refid = '" + refid + "'";
DataTable dt = GetDt(str);
dataGridView1.DataSource = dt;
//VerticalGrid(dt);
}
public void Daily(string refid)
{
string str = "select * from dailywork where refid = '" + refid + "'";
DataTable dt = GetDt(str);
VerticalGrid(dt);
}
#endregion
#region Grid
private void VerticalGrid(DataTable dt)
{
// Creating a table for to display in a Vertical manner
DataTable table = new DataTable();
//Get the Number of rows to make new column
for (int i = 0; i <= dt.Rows.Count; i++)
table.Columns.Add(Con
Bharath Kumar Gorle
9-Jan-13 6:56am
View
Deleted
From1 code
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Imaging;
using System.Text;
using System.Windows.Forms;
using DevComponents.DotNetBar;
using System.Data.SqlClient;
using System.Configuration;
using System.IO;
namespace Employee_Management
{
public partial class ViewDetails : DevComponents.DotNetBar.Metro.MetroForm
{
byte[] byteImg;
public ViewDetails()
{
InitializeComponent();
}
DataSet ds = new DataSet();
private void Form7_Load(object sender, EventArgs e)
{
// TODO: This line of code loads data into the 'emp_mgmtDataSet1.employee' table. You can move, or remove it, as needed.
this.employeeTableAdapter1.Fill(this.emp_mgmtDataSet1.employee);
// TODO: This line of code loads data into the 'emp_mgmtDataSet.employee' table. You can move, or remove it, as needed.
this.employeeTableAdapter.Fill(this.emp_mgmtDataSet.employee);
foreach (var ctrl in this.Controls)
if (ctrl is TextBox)
(ctrl as TextBox).ReadOnly = true;
}
#region Button_Click_Events
private void button1_Click(object sender, EventArgs e)
{
button3.Visible = true;
textBox14.Visible = true;
foreach (var ctrl in this.Controls)
{
if (ctrl is TextBox)
(ctrl as TextBox).ReadOnly = false;
}
}
private void button2_Click(object sender, EventArgs e)
{
string str = "update employee set fname ='" + textBox1.Text + "',lname ='" + textBox2.Text + "' ,email = '" + textBox4.Text + "',mobile = '" + textBox5.Text + "',college ='" + textBox6.Text + "',collegelocation ='" + textBox7.Text + "',fathername ='" + textBox8.Text + "',nationality='" + textBox9.Text + "',dob='" + textBox10.Text + "',gender ='" + textBox11.Text + "',currentaddress = '" + textBox12.Text + "',permanentaddress ='" + textBox13.Text + "',photo= @photo,experience ='" + textBox15.Text + "',currentindustry='" + textBox16.Text + "',domain = '" + textBox17.Text + "',keyskills ='" + textBox18.Text + "' where refid = '" + comboBox1.SelectedValue +"'";
SqlConnection con = new SqlConnection("Data Source=NAROLIS-1-PC;Initial Catalog=emp_mgmt;Persist Security Info=True;User ID=sa;Password=Narolis");
SqlCommand cmd = new SqlCommand(str, con);
byte[] byteImg;
if (pictureBox1.Image != null)
{
MemoryStream ms = new MemoryStream();
pictureBox1.Image.Save(ms, ImageFormat.Jpeg);
byteImg = new byte[ms.Length];
ms.Position = 0;
ms.Read(byteImg, 0, byteImg.Length);
cmd.Parameters.AddWithValue("@photo", byteImg);
}
con.Open();
int n = cmd.ExecuteNonQuery();
con.Close();
if (n > 0)
{
MessageBox.Show("The employee " + comboBox1.SelectedValue + "Hasbeen Modified");
}
else
MessageBox.Show("Upadation failed");
txtclear();
}
private void button3_Click(object sender, EventArgs e)
{
OpenFileDialog open = new OpenFileDialog();
open.Filter = "Image Files(*.jpg; *.jpeg; *.gif; *.bmp)|*.jpg; *.jpeg; *.gif; *.bmp";
if (open.ShowDialog() == DialogResult.OK)
{
pictureBox1.Image = new Bitmap(open.FileName);
textBox14.Text = open.FileName;
}
}
private void button4_Click(object sender, EventArgs e)
{
string str = comboBox1.SelectedValue.ToString();
//Form6 f6 = n
Bharath Kumar Gorle
9-Jan-13 6:44am
View
If you want to see... I will give my team viewer passowrd...
Bharath Kumar Gorle
9-Jan-13 6:41am
View
Ya bro..thats what i was confused..why this error...
Bharath Kumar Gorle
9-Jan-13 6:27am
View
if (dt.Rows.Count > 0)
dataGridView1.DataSource = dt;
i used this code..even i get thet error...
Bharath Kumar Gorle
9-Jan-13 5:14am
View
thank you...thank you...
Bharath Kumar Gorle
9-Jan-13 5:08am
View
Sir my question is....
form1 is having combobox..having value member displayed from database....
the value member called refid
form2 is having datagrid...when ever we click a button basing on the refid...the id details will be displayed on the form2 DATAGRID....
but in my application updatin of datagrid is not possible...because the combobox.selectedvalue is not coming to form2...why please tell me.....If possible give me the code...
Bharath Kumar Gorle
9-Jan-13 4:50am
View
Sir my question is....
form1 is having combobox..having value member displayed from database....
the value member called
refid
form2 is having datagrid...when ever we click a button basing on the refid...the id details will be displayed on the form2 DATAGRID....
but in my application updatin of datagrid is not possible...because the combobox.selectedvalue is not coming to form2...why please tell me.....If possible give me the code...
Bharath Kumar Gorle
9-Jan-13 4:17am
View
Thank you...for your suggestion..i am very fresher to the dot net programming..since one month only i am practicing the dot net...So i have asked the code....
Bharath Kumar Gorle
8-Jan-13 5:25am
View
Wil you give me that code...
Consider that...
We are having
form1 and form2
form1 is having combobox...The values in combo box are taken from database only.....
we have to take that selectd value to form2.....
Thanks In advance...Waitng for ur reply....
Bharath Kumar Gorle
8-Jan-13 5:03am
View
Thank you Graus...
Show More