public IResponse <ApiResponse> InsertExamDetail([FromBody] ExamDescription examDescription) { adminMasterService.InsertResultDescriptionService(examDescription); string Result = adminMasterService.ExamDescriptionService(); return(BuildResponse(Result, System.Net.HttpStatusCode.OK)); }
//Do it private void DgvExamList_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex >= 0 && this.dgvExamList.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString().Equals(Constants.DO_IT)) { Form parentForm = (Form)this.Parent.Parent.Parent.Parent; FormPassValue.languageState = Thread.CurrentThread.CurrentCulture.ToString(); FormPassValue.currentWindowState = parentForm.WindowState; ExamDescription examDescription = new ExamDescription(); FormPassValue.examId = Convert.ToInt32(this.dgvExamList.Rows[e.RowIndex].Cells[2].Value); DialogResult result = examDescription.ShowDialog(); if (result == DialogResult.OK) { //Don't write outside, that run form take exam timer FormTakeExam formTakeExam = new FormTakeExam(); //Show take exam form and transfer main form object formTakeExam.Show(parentForm); //Hide main form parentForm.Hide(); } } }
public string InsertResultDescriptionService(ExamDescription examDescription) { ServiceResult serviceResult = validateModalService.ValidateModalFieldsService <ExamDescription>(examDescription); if (serviceResult.IsValidModal) { DbParam[] param = new DbParam[] { new DbParam(examDescription.ExamDescriptionUid, typeof(System.String), "_examiddescriptionid"), new DbParam(examDescription.ExamName, typeof(System.String), "_examName"), new DbParam(examDescription.Description, typeof(System.String), "_description"), new DbParam(examDescription.ExpectedDate, typeof(System.DateTime), "_expectedDate"), new DbParam(examDescription.ActualDate, typeof(System.DateTime), "_actualDate"), new DbParam(userDetail.schooltenentId, typeof(System.String), "_schooltenentid"), new DbParam(userDetail.UserId, typeof(System.String), "_adminId") }; Result = db.ExecuteNonQuery("sp_examiddescription_InsUpd", param, true); } return(Result); }
//Do it private void dgvExamList_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex >= 0 && this.dgvExamList.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString().Equals(Constants.doIt)) { ExamDescription examDescription = new ExamDescription(); //transfer examId FormPassValue.examId = Convert.ToInt32(this.dgvExamList.Rows[e.RowIndex].Cells[2].Value); DialogResult result = examDescription.ShowDialog(); if (result == DialogResult.OK) { //avoid write outside, that run form take exam timer FormTakeExam formTakeExam = new FormTakeExam(); //show take exam form and transfer main form object formTakeExam.Show(this.Parent.Parent.Parent.Parent.Parent); //Hide main form this.Parent.Parent.Parent.Parent.Parent.Hide(); } } }