|
i take this program in c# from code project and this code is written by phd student in UK and he from jordon
when i try to modfiy it i hove some problem in insert & update (syntax error ) but the search and delete is work fine
here is the complet code after my modifying
can you help me pls
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.OleDb;
namespace WindowsApplication1
{
///
/// Summary description for Form1.
///
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.TextBox textBox3;
private System.Windows.Forms.TextBox textBox4;
private System.Windows.Forms.Button Add_btn;
private System.Windows.Forms.Button up_btn;
private System.Windows.Forms.Button del_btn;
private System.Windows.Forms.Button find_btn;
private System.Data.OleDb.OleDbDataAdapter oleDbDataAdapter1;
private System.Data.OleDb.OleDbCommand oleDbSelectCommand1;
private System.Data.OleDb.OleDbCommand oleDbInsertCommand1;
private System.Data.OleDb.OleDbCommand oleDbUpdateCommand1;
private System.Data.OleDb.OleDbCommand oleDbDeleteCommand1;
private System.Data.OleDb.OleDbConnection oleDbConnection1;
private WindowsApplication1.DataSet1 dataSet11;
private System.Windows.Forms.Label qurey_label;
///
/// Required designer variable.
///
private System.ComponentModel.Container components = null;
public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
///
/// Clean up any resources being used.
///
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
this.textBox1 = new System.Windows.Forms.TextBox();
this.dataSet11 = new WindowsApplication1.DataSet1();
this.textBox2 = new System.Windows.Forms.TextBox();
this.textBox3 = new System.Windows.Forms.TextBox();
this.textBox4 = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.Add_btn = new System.Windows.Forms.Button();
this.up_btn = new System.Windows.Forms.Button();
this.del_btn = new System.Windows.Forms.Button();
this.find_btn = new System.Windows.Forms.Button();
this.oleDbDataAdapter1 = new System.Data.OleDb.OleDbDataAdapter();
this.oleDbDeleteCommand1 = new System.Data.OleDb.OleDbCommand();
this.oleDbConnection1 = new System.Data.OleDb.OleDbConnection();
this.oleDbInsertCommand1 = new System.Data.OleDb.OleDbCommand();
this.oleDbSelectCommand1 = new System.Data.OleDb.OleDbCommand();
this.oleDbUpdateCommand1 = new System.Data.OleDb.OleDbCommand();
this.qurey_label = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.dataSet11)).BeginInit();
this.SuspendLayout();
//
// textBox1
//
this.textBox1.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataSet11, "Db.ID", true));
this.textBox1.Location = new System.Drawing.Point(104, 64);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(216, 20);
this.textBox1.TabIndex = 0;
//
// dataSet11
//
this.dataSet11.DataSetName = "DataSet1";
this.dataSet11.Locale = new System.Globalization.CultureInfo("en-US");
this.dataSet11.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema;
//
// textBox2
//
this.textBox2.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataSet11, "Db.dnasequence", true));
this.textBox2.Location = new System.Drawing.Point(104, 104);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(216, 20);
this.textBox2.TabIndex = 1;
//
// textBox3
//
this.textBox3.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataSet11, "Db.p-name", true));
this.textBox3.Location = new System.Drawing.Point(104, 144);
this.textBox3.Name = "textBox3";
this.textBox3.Size = new System.Drawing.Size(216, 20);
this.textBox3.TabIndex = 2;
//
// textBox4
//
this.textBox4.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataSet11, "Db.address", true));
this.textBox4.Location = new System.Drawing.Point(104, 184);
this.textBox4.Name = "textBox4";
this.textBox4.Size = new System.Drawing.Size(216, 20);
this.textBox4.TabIndex = 3;
//
// label1
//
this.label1.Location = new System.Drawing.Point(16, 64);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(72, 23);
this.label1.TabIndex = 4;
this.label1.Text = "ID";
//
// label2
//
this.label2.Location = new System.Drawing.Point(16, 104);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(72, 23);
this.label2.TabIndex = 5;
this.label2.Text = "dnasequence";
//
// label3
//
this.label3.Location = new System.Drawing.Point(16, 144);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(72, 23);
this.label3.TabIndex = 6;
this.label3.Text = "p-name";
//
// label4
//
this.label4.Location = new System.Drawing.Point(16, 184);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(80, 23);
this.label4.TabIndex = 7;
this.label4.Text = "address";
//
// Add_btn
//
this.Add_btn.Location = new System.Drawing.Point(40, 16);
this.Add_btn.Name = "Add_btn";
this.Add_btn.Size = new System.Drawing.Size(75, 23);
this.Add_btn.TabIndex = 8;
this.Add_btn.Text = "Add";
this.Add_btn.Click += new System.EventHandler(this.Add_btn_Click);
//
// up_btn
//
this.up_btn.Location = new System.Drawing.Point(136, 16);
this.up_btn.Name = "up_btn";
this.up_btn.Size = new System.Drawing.Size(75, 23);
this.up_btn.TabIndex = 9;
this.up_btn.Text = "Update";
this.up_btn.Click += new System.EventHandler(this.up_btn_Click);
//
// del_btn
//
this.del_btn.Location = new System.Drawing.Point(240, 16);
this.del_btn.Name = "del_btn";
this.del_btn.Size = new System.Drawing.Size(75, 23);
this.del_btn.TabIndex = 10;
this.del_btn.Text = "Delete";
this.del_btn.Click += new System.EventHandler(this.del_btn_Click);
//
// find_btn
//
this.find_btn.Location = new System.Drawing.Point(16, 312);
this.find_btn.Name = "find_btn";
this.find_btn.Size = new System.Drawing.Size(320, 24);
this.find_btn.TabIndex = 11;
this.find_btn.Text = "Find";
this.find_btn.Click += new System.EventHandler(this.find_btn_Click);
//
// oleDbDataAdapter1
//
this.oleDbDataAdapter1.DeleteCommand = this.oleDbDeleteCommand1;
this.oleDbDataAdapter1.InsertCommand = this.oleDbInsertCommand1;
this.oleDbDataAdapter1.SelectCommand = this.oleDbSelectCommand1;
this.oleDbDataAdapter1.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
new System.Data.Common.DataTableMapping("Table", "Db", new System.Data.Common.DataColumnMapping[] {
new System.Data.Common.DataColumnMapping("ID", "ID"),
new System.Data.Common.DataColumnMapping("dnasequence", "dnasequence"),
new System.Data.Common.DataColumnMapping("address", "address"),
new System.Data.Common.DataColumnMapping("p-name", "p-name")})});
this.oleDbDataAdapter1.UpdateCommand = this.oleDbUpdateCommand1;
//
// oleDbDeleteCommand1
//
this.oleDbDeleteCommand1.CommandText = "DELETE FROM Db WHERE (ID = ?) AND (address = ? OR ? IS NULL AND addonNumber IS NU" +
"LL) AND (dnasequence = ? OR ? IS NULL AND dnasequence IS NULL) AND (p-name = ? O" +
"R ? IS NULL AND p-name IS NULL)";
this.oleDbDeleteCommand1.Connection = this.oleDbConnection1;
this.oleDbDeleteCommand1.Parameters.AddRange(new System.Data.OleDb.OleDbParameter[] {
new System.Data.OleDb.OleDbParameter("Original_ID", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(10)), ((byte)(0)), "ID", System.Data.DataRowVersion.Original, null),
new System.Data.OleDb.OleDbParameter("Original_address", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "address", System.Data.DataRowVersion.Original, null),
new System.Data.OleDb.OleDbParameter("Original_address1", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "address", System.Data.DataRowVersion.Original, null),
new System.Data.OleDb.OleDbParameter("Original_dnasequence", System.Data.OleDb.OleDbType.VarWChar, 200, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "dnasequence", System.Data.DataRowVersion.Original, null),
new System.Data.OleDb.OleDbParameter("Original_dnasequence1", System.Data.OleDb.OleDbType.VarWChar, 200, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "dnasequence", System.Data.DataRowVersion.Original, null),
new System.Data.OleDb.OleDbParameter("Original_p-name", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "p-name", System.Data.DataRowVersion.Original, null),
new System.Data.OleDb.OleDbParameter("Original_p-name1", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "p-name", System.Data.DataRowVersion.Original, null)});
//
// oleDbConnection1
//
this.oleDbConnection1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Users\\MOHAMMED\\Downloads\\Ado_src\\" +
"WindowsApplication1\\Db.mdb";
//
// oleDbInsertCommand1
//
this.oleDbInsertCommand1.CommandText = "INSERT INTO Db(p-name, address, ID, dnasequence) VALUES (?, ?, ?, ?)";
this.oleDbInsertCommand1.Connection = this.oleDbConnection1;
this.oleDbInsertCommand1.Parameters.AddRange(new System.Data.OleDb.OleDbParameter[] {
new System.Data.OleDb.OleDbParameter("p-name", System.Data.OleDb.OleDbType.VarWChar, 50, "p-name"),
new System.Data.OleDb.OleDbParameter("address", System.Data.OleDb.OleDbType.VarWChar, 50, "address"),
new System.Data.OleDb.OleDbParameter("ID", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(10)), ((byte)(0)), "ID", System.Data.DataRowVersion.Current, null),
new System.Data.OleDb.OleDbParameter("dnasequence", System.Data.OleDb.OleDbType.VarWChar, 200, "dnasequence")});
//
// oleDbSelectCommand1
//
this.oleDbSelectCommand1.CommandText = "SELECT p-name, address, ID, dnasequence FROM Db";
this.oleDbSelectCommand1.Connection = this.oleDbConnection1;
//
// oleDbUpdateCommand1
//
this.oleDbUpdateCommand1.CommandText = resources.GetString("oleDbUpdateCommand1.CommandText");
this.oleDbUpdateCommand1.Connection = this.oleDbConnection1;
this.oleDbUpdateCommand1.Parameters.AddRange(new System.Data.OleDb.OleDbParameter[] {
new System.Data.OleDb.OleDbParameter("p-name", System.Data.OleDb.OleDbType.VarWChar, 50, "p-name"),
new System.Data.OleDb.OleDbParameter("address", System.Data.OleDb.OleDbType.VarWChar, 50, "address"),
new System.Data.OleDb.OleDbParameter("ID", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(10)), ((byte)(0)), "ID", System.Data.DataRowVersion.Current, null),
new System.Data.OleDb.OleDbParameter("dnasequence", System.Data.OleDb.OleDbType.VarWChar, 200, "dnasequence"),
new System.Data.OleDb.OleDbParameter("Original_ID", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((byte)(10)), ((byte)(0)), "ID", System.Data.DataRowVersion.Original, null),
new System.Data.OleDb.OleDbParameter("Original_address", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "address", System.Data.DataRowVersion.Original, null),
new System.Data.OleDb.OleDbParameter("Original_address1", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "address", System.Data.DataRowVersion.Original, null),
new System.Data.OleDb.OleDbParameter("Original_dnasequence", System.Data.OleDb.OleDbType.VarWChar, 200, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "dnasequence", System.Data.DataRowVersion.Original, null),
new System.Data.OleDb.OleDbParameter("Original_dnasequence1", System.Data.OleDb.OleDbType.VarWChar, 200, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "dnasequence", System.Data.DataRowVersion.Original, null),
new System.Data.OleDb.OleDbParameter("Original_p-name", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "p-name", System.Data.DataRowVersion.Original, null),
new System.Data.OleDb.OleDbParameter("Original_p-name1", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, false, ((byte)(0)), ((byte)(0)), "p-name", System.Data.DataRowVersion.Original, null)});
//
// qurey_label
//
this.qurey_label.Location = new System.Drawing.Point(40, 224);
this.qurey_label.Name = "qurey_label";
this.qurey_label.Size = new System.Drawing.Size(288, 72);
this.qurey_label.TabIndex = 12;
this.qurey_label.Text = "Qurey";
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(360, 366);
this.Controls.Add(this.qurey_label);
this.Controls.Add(this.find_btn);
this.Controls.Add(this.del_btn);
this.Controls.Add(this.up_btn);
this.Controls.Add(this.Add_btn);
this.Controls.Add(this.label4);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.textBox4);
this.Controls.Add(this.textBox3);
this.Controls.Add(this.textBox2);
this.Controls.Add(this.textBox1);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "Form1";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Form1";
((System.ComponentModel.ISupportInitialize)(this.dataSet11)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
///
/// The main entry point for the application.
///
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void find_btn_Click(object sender, System.EventArgs e)
{
try
{
this.oleDbDataAdapter1.SelectCommand.CommandText =
"SELECT * FROM Db WHERE ID = "+ this.textBox1.Text;
// clear the DataSet from the last operation
dataSet11.Clear();
this.oleDbDataAdapter1.Fill(this.dataSet11.Tables["Db"]);
}
catch(System.Data.OleDb.OleDbException exp)
{
MessageBox.Show(exp.ToString());
}
//copy the dataset in datatable object
DataTable dataTable = dataSet11.Tables[ 0 ];
//if the row count = 0 then the qurey return nothing
if ( dataTable.Rows.Count == 0 )
MessageBox.Show("the Record not founded");
}
private void Add_btn_Click(object sender, System.EventArgs e)
{
try
{
this.oleDbDataAdapter1.InsertCommand.CommandText =
"INSERT INTO Db (p-name, address, ID, dnasequence)" +
"VALUES ('"+ this.textBox3.Text +"','"+this.textBox4.Text+
"' , "+ this.textBox1.Text +",'"+ this.textBox2.Text+ "')";
//open the bridge between the application and the datasource
this.oleDbConnection1.Open();
this.oleDbDataAdapter1.InsertCommand.Connection = oleDbConnection1;
//execute the qurey
this.oleDbDataAdapter1.InsertCommand.ExecuteNonQuery();
//close the connection
this.oleDbConnection1.Close();
MessageBox.Show("Record insedted Successfully"); //inform the user
//clear the form
this.textBox2.Text = "";
this.textBox1.Text = "";
this.textBox3.Text = "";
this.textBox4.Text = "";
//show the qurey
this.qurey_label.Text = "";
this.qurey_label.Text = oleDbDataAdapter1.InsertCommand.CommandText.ToString();
}
catch(System.Data.OleDb.OleDbException exp)
{
//close the connection
this.oleDbConnection1.Close();
MessageBox.Show(exp.ToString());
}
}
private void up_btn_Click(object sender, System.EventArgs e)
{
try
{
this.oleDbDataAdapter1.UpdateCommand.CommandText =
"UPDATE Db SET "+
"p-name ='"+ this.textBox3.Text +"', address ='"+this.textBox4.Text +
"', ID ="+this.textBox1.Text+", dnasequence ='"+ this.textBox2.Text+"'" +
" WHERE ID ="+ this.textBox1.Text;
//open the bridge between the application and the datasource
this.oleDbConnection1.Open();
this.oleDbDataAdapter1.UpdateCommand.Connection = oleDbConnection1;
//execute the qurey
this.oleDbDataAdapter1.UpdateCommand.ExecuteNonQuery();
//close the connection
this.oleDbConnection1.Close();
MessageBox.Show("Record updated Successfully"); //inform the user
//clear the form
this.textBox2.Text = "";
this.textBox1.Text = "";
this.textBox3.Text = "";
this.textBox4.Text = "";
//show the qurey
this.qurey_label.Text = "";
this.qurey_label.Text = oleDbDataAdapter1.UpdateCommand.CommandText.ToString();
}
catch(System.Data.OleDb.OleDbException exp)
{
//close the connection
this.oleDbConnection1.Close();
MessageBox.Show(exp.ToString());
}
}
private void del_btn_Click(object sender, System.EventArgs e)
{
try
{
this.oleDbDataAdapter1.DeleteCommand.CommandText =
"DELETE FROM Db WHERE ID =" + this.textBox1.Text;
//open the bridge between the application and the datasource
this.oleDbConnection1.Open();
this.oleDbDataAdapter1.DeleteCommand.Connection = oleDbConnection1;
//execute the qurey
this.oleDbDataAdapter1.DeleteCommand.ExecuteNonQuery();
//close the connection
this.oleDbConnection1.Close();
MessageBox.Show("Record deleted Successfully"); //inform the user
//clear the form
this.textBox2.Text = "";
this.textBox1.Text = "";
this.textBox3.Text = "";
this.textBox4.Text = "";
//show the qurey
this.qurey_label.Text = "";
this.qurey_label.Text = oleDbDataAdapter1.DeleteCommand.CommandText.ToString();
}
catch(System.Data.OleDb.OleDbException exp)
{
//close the connection
this.oleDbConnection1.Close();
MessageBox.Show(exp.ToString());
}
}
}
}
|
|
|
|
|
This is just an unformatted code dump. If you really expect an answer you should cut this down to the relevant section of code that you have a problem with and properly format your text.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
private void Add_btn_Click(object sender, System.EventArgs e)
{
try
{
this.oleDbDataAdapter1.InsertCommand.CommandText =
"INSERT INTO Db (p-name, address, ID, dnasequence)" +
"VALUES ('"+ this.textBox3.Text +"','"+this.textBox4.Text+
"' , "+ this.textBox1.Text +",'"+ this.textBox2.Text+ "')";
this.oleDbConnection1.Open();
this.oleDbDataAdapter1.InsertCommand.Connection = oleDbConnection1;
this.oleDbDataAdapter1.InsertCommand.ExecuteNonQuery();
this.oleDbConnection1.Close();
MessageBox.Show("Record insedted Successfully");
private void up_btn_Click(object sender, System.EventArgs e)
{
try
{
this.oleDbDataAdapter1.UpdateCommand.CommandText =
"UPDATE Db SET "+
"p-name ='"+ this.textBox3.Text +"', address ='"+this.textBox4.Text +
"', ID ="+this.textBox1.Text+", dnasequence ='"+ this.textBox2.Text+"'" +
" WHERE ID ="+ this.textBox1.Text;
this.oleDbConnection1.Open();
this.oleDbDataAdapter1.UpdateCommand.Connection = oleDbConnection1;
this.oleDbDataAdapter1.UpdateCommand.ExecuteNonQuery();
this.oleDbConnection1.Close();
MessageBox.Show("Record updated Successfully");
|
|
|
|
|
They should have told the PhD about sql-injection. And proper OO-code. And proper field-names.
..so, you're looking for somebody to rewrite the "update" and "insert" portions?
Bastard Programmer from Hell
|
|
|
|
|
the orginal code is work without any error thr error arise when i chang the database name and column name and also i chang the names in the code
|
|
|
|
|
What error? Could you explain what needs be changed (insert, update) and why - I don't understand the question yet.
If you change the field-names, then make sure that you update them everywhere. Don't use spaces in names, and don't use keywords.
Bastard Programmer from Hell
|
|
|
|
|
mohammed_1983 wrote: the orginal code is work without any error
Wait a minute.... so you had some code from somewhere that you change a bunch of stuff in and then you expect someone else to go through it and fix what you broke?
Does the database you changed to actually exist? Did you change the connection string? Does the table that you are querying really exist? Do the column names in the table match the names in your code? Is the connection opening?
The best thing you can do right off the bat is change all of that string concatenation to parameterized queries.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
Try and debug your source code. Put a breakpoint on the line of the query - once running code hits the breakpoint, copy the query from there into Access and run it. You will get to know where the error is.
|
|
|
|
|
Given a text string and an SVG font I need to create an SVG file where each character is represented by a path.
I know that SVG font is just a collection of glyphs so rendering should be relatively easy. However some operations like calculating position of each character, rendering in different font sizes, etc. may be tricky.
Has anyone come across a solution that implements this?
|
|
|
|
|
i've just created a bouncing animation with maximum 100 ball bouncing inside a rectangle.
and i'd love to create a ball bouncing inside a disorder box shape.
i've search over google and keeps finding bouncing ball with gravity.
i mean the one that bounce diagonally.
anyone know what should i type in google?
i really don't know what people call this animation.
|
|
|
|
|
Is it not possible to modify the source code you already have to modify the animation?
I'm sure with some playing around of the code, you would be able to do something.
|
|
|
|
|
Hej
How can I add navigation bar for min tigrina lexikon.
i mean I wanted a single bar for menu navigation in asp.net
|
|
|
|
|
You could try the ASP.NET forum.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
please I really need a code for the african board game AYO for my project.
|
|
|
|
|
Which bit of the code are you missing? I take it you have coded the rest of the game, and there's just a bit missing. Heaven forbid that you're asking for somebody else to do all the work for you.
|
|
|
|
|
Am new to programming but I was given as my project but I dont even know where to start from. I have code one but it is console application.
|
|
|
|
|
I have to move 10 million dollars out of the US. Can you give me your bank account details, and I'll share some with you!
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
I pleez to help for you?
|
|
|
|
|
cplusplus018 wrote: I dont even know where to start from
<joke>
static void Main()
{
}
</joke>
Start by gaining an understanding of the game.
Replicate the objects in the game, players etc as classes.
Create the logic that governs the game play and interacts with the objects - test this stage thoroughly!
Draw the GUI to retrieve information from the user(s) and the game status if apropriate.
|
|
|
|
|
hi,
I am using an aspxgridview and two checkboxes(for header and dataitem).When I check header checkbox I want to check all checkbox.I am also using java script code.essentially, I can do this, but I must check header checkbox twice times.I didnt understand why it is happening.ı am writing this code checkbox_checked event and header checkbox's autopostpak is true. When I used normal gridview I didnt have any problem I could do this without problem.,
<script language="javascript" type="text/javascript">
function SelectAll(id) {
var IsChecked = id.checked;
var Chk = id;
// Parent = document.getElementById('GrdPerliste');
Parent = document.getElementById('<% = GrdPerliste.ClientID%>');
var items = Parent.getElementsByTagName('input');
for (i = 0; i < items.length; i++) {
var deneme = items[i].type;
if (items[i].id != Chk && items[i].type == "checkbox") {
if (items[i].checked != IsChecked)
{ items[i].click(); }
}
}
}
</script>
protected void Checksec_CheckedChanged2(object sender, EventArgs e)
{
CheckBox chk = (CheckBox)sender;
GridViewHeaderTemplateContainer bulundugucontainer = (GridViewHeaderTemplateContainer)chk.NamingContainer;
((CheckBox)bulundugucontainer.FindControl("Checksec")).Attributes.Add("onclick", "javascript:SelectAll('" + ((CheckBox)bulundugucontainer.FindControl("Checksec")).ClientID + "')");
}
|
|
|
|
|
try this javascript function
function SelectAll(cntrl,grd,indCat)
{
var grdComp = document.getElementById(grd);
if(indCat == '1')
{
for(i=1;i<=grdComp.getElementsByTagName('input').length-1;i++)
{
grdComp.getElementsByTagName('input')[i].checked = cntrl.checked;
}
}
else if(indCat == '2')
{
var chkInd = true;
for(i=1;i<=grdComp.getElementsByTagName('input').length-1;i++)
{
if(grdComp.getElementsByTagName('input')[i].checked == false)
{
chkInd = false;
}
}
grdComp.getElementsByTagName('input')[0].checked = chkInd;
}
}
hope this helps
with regards
Karthik Harve
|
|
|
|
|
thanks for your answer but my problem is that I have to check header checkbox twice.this works only when I check twice so when it works,header check seems not check
|
|
|
|
|
Hi,
I really need help with this...
I need to write c# app (from windows)that will connect to Linux virtual machine server(SLES 10)
with the following information for example:
VM server : example01.xx.example.com
Userid: rrrr
Pssword: rrrr
How can i do it?
all the example that i saw i for connection with TCP.IP address and with port.
Can someone provide me a simple example of C# code for connection to such a Linux server from windows app?
|
|
|
|
|
ronensv wrote: all the example that i saw i for connection with TCP.IP address and with port.
Can someone provide me a simple example of C# code
And the reason that you are unable to use TCP is?
Maybe you can explain what it is that you are trying to connect to? What is it on the Linux side that is waiting for you to connect to it?
And please do not cross post.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
modified 20-Apr-12 7:26am.
|
|
|
|
|
|