private void ADD_Click(object sender, EventArgs e) { try { AssessmentComClass ACC = new AssessmentComClass(); if (ASSName.Text == "" || TotalMarks.Text == "") { MessageBox.Show("please fillall the fields first"); } else { string Rubric = RubricSelection.Text; string assessment = AssessmentSelection.Text; ACC.ASSCOM_ADD(ASSName.Text, Rubric, assessment, Convert.ToInt32(TotalMarks.Text), DateCreated.Value, DateUpdated.Value); MessageBox.Show("Data has been added successfully"); RubricSelection.DataSource = null; ASSName.Text = ""; RubricSelection.Text = ""; AssessmentSelection.Text = ""; TotalMarks.Text = ""; DateCreated.ResetText(); DateUpdated.ResetText(); My_Own_Load(); } } catch (Exception ex) { MessageBox.Show("Data insertion Fail,Try again with valid input"); return; } }
private void Add_Click(object sender, EventArgs e) { if (CloName.Text == "") { MessageBox.Show("Must fill the Name attribute"); CloName_TextChanged(sender, e); return; } if (DateCreated.Value == null) { MessageBox.Show("Must select the date for Datecreated"); DateCreated_ValueChanged(sender, e); return; } if (DateUpdated.Value == null) { MessageBox.Show("Must select the date for DateUpdated"); DateUpdated_ValueChanged(sender, e); return; } else { CLOClass clo1 = new CLOClass(); clo1.ADD_Clo(CloName.Text.Trim(), DateCreated.Value, DateUpdated.Value); MessageBox.Show("Data has been added successfully"); CloName.Text = " "; DateCreated.ResetText(); DateUpdated.ResetText(); Clo_Management_Load_1(sender, e); } }
private void Save_Click(object sender, EventArgs e) { CLOClass clo = new CLOClass(); if (CloName.Text == " ") { MessageBox.Show("Must fill the Name"); CloName_TextChanged(sender, e); } else { clo.Edit(globalindex2, CloName.Text, DateCreated.Value, DateUpdated.Value); CloName.Text = " "; DateCreated.ResetText(); DateUpdated.ResetText(); Clo_Management_Load_1(sender, e); } }
private void Save_Click(object sender, EventArgs e) { try { string Rubric = RubricSelection.Text; string assessment = AssessmentSelection.Text; AssessmentComClass Rub = new AssessmentComClass(); Rub.Edit(globalindex, ASSName.Text, Rubric, assessment, Convert.ToInt32(TotalMarks.Text), DateCreated.Value, DateUpdated.Value); AssessmentRecord.DataSource = null; ASSName.Text = ""; RubricSelection.Text = ""; AssessmentSelection.Text = ""; TotalMarks.Text = ""; DateCreated.ResetText(); DateUpdated.ResetText(); My_Own_Load(); ADD.Visible = true; } catch (Exception ex) { MessageBox.Show("Data can,t be update,please enter valid data"); } }