i doing a project regarding web service and window form application
what i have done is to retrieve the data to the datagridview by using the web service web method
however i am stuck with some of the problem
1. how am i going to do insert a record to the datagridview?
2. can i put delete button in each row so that user able to delete accordingly??
3. i able to do the update but how am i going to combine with the insert? so that if user insert an existing record, it can prompt them?
this is my retrieve and update code
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
Binds();
}
protected void Bind()
{
WSRoll roll = new WSRoll();
GVRoll.AutoGenerateColumns = false;
GVRoll.DataSource = roll.getRoll().Tables[0];
}
private void btnUpdate_Click(object sender, EventArgs e)
{
WSRoll updater = new WSRoll();
GVRoll.DataSource = updater.updateRoll(Convert.ToInt32(GVRoll.CurrentRow.Cells[0].Value), Convert.ToString(GVRoll.CurrentRow.Cells[1].Value), Convert.ToInt32(GVRoll.CurrentRow.Cells[2].Value));
Bind();
}
thanks in advance, hope to get some help soon

New Topic/Question
Reply



MultiQuote




|