private void btnLechallSearch_Click(object sender, EventArgs e) { Lechallsc u = new Lechallsc(); Service4Client service = new Service4Client(); u = service.SearchLecHalls(txtHcode.Text); if (u != null) { txtHcode.Text = u.Lechallcode; txtNumstu.Text = u.Numstu; } else { MessageBox.Show("Invalid Mode Code !! Try Again !!"); } }
private void btnLechallAdd_Click(object sender, EventArgs e) { Lechallsc lhdc = new Lechallsc(); lhdc.Lechallcode = txtHcode.Text; lhdc.Numstu = txtNumstu.Text; Service4Client service = new Service4Client(); if (service.AddLecHalls(lhdc) == 1) { MessageBox.Show("Successfully Saved"); TableLoad(); } else { MessageBox.Show("Error.. Please Try Again"); } }
private void btnLechallDelete_Click(object sender, EventArgs e) { Lechallsc dclh = new Lechallsc(); { dclh.Lechallcode = txtHcode.Text; }; Service4Client service = new Service4Client(); if (service.DeleteComLecHalls(dclh) == 1) { MessageBox.Show("Successfully Deleted"); TableLoad(); } else { MessageBox.Show("Error.. Please Try Again"); } }
private void btnLechallUpdate_Click(object sender, EventArgs e) { Lechallsc uclh = new Lechallsc(); { uclh.Lechallcode = txtHcode.Text; uclh.Numstu = txtNumstu.Text; }; Service4Client service = new Service4Client(); if (service.UpdateComlecHalls(uclh) == 1) { MessageBox.Show("Successfully Updated"); TableLoad(); } else { MessageBox.Show("Error.. Please Try Again"); } }