public void editprogbutton_Click(object sender, EventArgs e) { //Datacontainer.loginDID = 123456; controllerObj = new Controller(); int r = controllerObj.UpdateProg(Datacontainer.loginDID, (int)calcountNumericUpDown.Value, (int)calburnnumericUpDown.Value, (int)currweightnumericUpDown.Value); if (r > 0) { MessageBox.Show("Your progress is updated successfully!"); } //edit_Progress_Diary PD = new edit_Progress_Diary() ; else { MessageBox.Show("Your progress wasn't updated"); } //PD.Show(); }