private void LoadYourApprovals() { if (Session["FACinstdiv"].ToString().Length < 2) { ParentPortlet.ShowFeedback("Cannot process a blank INST_DIV"); return; } //if (Session["userLevel"].ToString() == "Approver1") //{ // gv_Your_Approvals.DataSource = facultyApprovalsView.getYourApprover1RecordsFaculty(Session["userLevel"].ToString(), Session["yearcode"].ToString(), Session["termcode"].ToString(), Session["FACidnum"].ToString(),Session["FACinstdiv"].ToString()); // //gv_Your_Approvals.DataSource = approvalsView.getYourApprover1FacultyDiscipline(Session["userLevel"].ToString(), Session["yearcode"].ToString(), Session["termcode"].ToString()); // gv_Your_Approvals.DataBind(); //} //else if (Session["userLevel"].ToString() == "Approver2") //{ // gv_Your_Approvals.DataSource = facultyApprovalsView.getYourApprover2RecordsFaculty(Session["userLevel"].ToString(), Session["yearcode"].ToString(), Session["termcode"].ToString(), Session["FACidnum"].ToString()); // //gv_Your_Approvals.DataSource = approvalsView.getYourApprover2FacultyDiscipline(Session["userLevel"].ToString(), Session["yearcode"].ToString(), Session["termcode"].ToString()); // gv_Your_Approvals.DataBind(); //} //else if (Session["userLevel"].ToString() == "Approver3") //{ // gv_Your_Approvals.DataSource = facultyApprovalsView.getYourApprover3RecordsFaculty(Session["userLevel"].ToString(), Session["yearcode"].ToString(), Session["termcode"].ToString(), Session["FACidnum"].ToString()); // //gv_Your_Approvals.DataSource = approvalsView.getYourApprover3FacultyDiscipline(Session["userLevel"].ToString(), Session["yearcode"].ToString(), Session["termcode"].ToString()); // gv_Your_Approvals.DataBind(); //} //else if (Session["userLevel"].ToString() == "FacCredUser") //{ // gv_Your_Approvals.DataSource = facultyApprovalsView.getYourFacCredUserRecordsFaculty(Session["userLevel"].ToString(), Session["yearcode"].ToString(), Session["termcode"].ToString(), Session["FACidnum"].ToString()); // //gv_Your_Approvals.DataSource = approvalsView.getYourFacCredUserFacultyDiscipline(Session["userLevel"].ToString(), Session["yearcode"].ToString(), Session["termcode"].ToString()); // gv_Your_Approvals.DataBind(); //} }
protected void btn_Faculty_Notes_Click(object sender, EventArgs e) { // clear out the edit screen for the next record //ParentPortlet.Session.Remove("EditId"); Session["returningFromNotes"] = "true"; ParentPortlet.NextScreen("FacultyNoteScreen"); }
protected void gv_User_Access_RowCommand(object sender, GridViewCommandEventArgs e) { string ctrlName = ((Control)sender).ID; string cmdName = e.CommandName.ToString(); int rowIndex = Convert.ToInt32(e.CommandArgument); GridViewRow row = gv_User_Access.Rows[rowIndex]; Session["SelectedUserID"] = (string)this.gv_User_Access.DataKeys[rowIndex]["UserID"]; Session["SelectedUserFirstName"] = row.Cells[1].Text; Session["SelectedUserLastName"] = row.Cells[2].Text; Session["SelectedDisplayName"] = row.Cells[3].Text; ; switch (cmdName) { case "gv_User_Access_Select": { //ParentPortlet.NextScreen("UserAccessUpdateScreen"); // this used nHibernate, moving back to direct sql ParentPortlet.NextScreen("UserAccessDirectUpdateScreen"); } break; case "gv_Course_Note": { // ParentPortlet.NextScreen("CoursesNoteScreen"); } break; } }
//-------- DIVISION UPDATE ----------------------------------------------- protected void btn_Division_Save_Click(object sender, EventArgs e) { try { if (ddl_Approval_Status.SelectedValue.ToString() == "0") { ParentPortlet.ShowFeedback(FeedbackType.Message, "Please select an Approval Status before saving"); return; } else if (txt_Division.Text.Length < 2) { ParentPortlet.ShowFeedback(FeedbackType.Message, "Cannot process a Blank DIVISION"); return; } if (Session["userLevel"].ToString() == "Approver1") { InsertCourseDivisionRecs(); } UpdateCourseDivisionRecs(); } catch (Exception ex) { errMsg.Visible = true; errMsg.ErrorMessage = ex.Message; ExceptionManager.Publish(ex); ParentPortlet.ShowFeedbackGlobalized(FeedbackType.Error, "Update Failed"); } finally { } }
protected void gv_Faculty_RowCommand(object sender, GridViewCommandEventArgs e) { string ctrlName = ((Control)sender).ID; string cmdName = e.CommandName.ToString(); int rowIndex = Convert.ToInt32(e.CommandArgument); GridViewRow row = gv_Faculty.Rows[rowIndex]; Session["FACappid"] = (string)this.gv_Faculty.DataKeys[rowIndex]["FACappid"]; Session["FACidnum"] = (string)this.gv_Faculty.DataKeys[rowIndex]["FACidnum"]; // FACULTY VALUES: Session["FAClastname"] = row.Cells[0].Text; Session["FACfirstname"] = row.Cells[1].Text; Session["FACinstructorType"] = row.Cells[2].Text; Session["FACdivcode"] = row.Cells[3].Text; Session["FACinstdiv"] = row.Cells[4].Text; Session["FACschoolcode"] = row.Cells[5].Text; //CLEAR OUT the Course Fields Session["CRSDesc"] = ""; Session["CRSappid"] = ""; Session["FACload"] = ""; Session["FAClead"] = ""; Session["CRSinstdiv"] = ""; Session["CRSschoolcode"] = ""; switch (cmdName) { case "gv_Faculty_Note": { Session["NOTEnote"] = ""; ParentPortlet.NextScreen("FacultyNoteScreen"); } break; case "gv_Faculty_Discipline": { if (Session["userLevel"].ToString() != "FacCredUser") { ParentPortlet.NextScreen("DisciplineUpdateScreen"); } else { ParentPortlet.ShowFeedback(FeedbackType.Message, "Only for Approvers"); } } break; case "gv_Faculty_Degree": { ParentPortlet.NextScreen("EDUEarnHistScreen"); } break; } }
internal bool LogAction(String reason, Guid userId) { try { var logger = new BCLoggerMapperService(); if (_logIpAddress) { reason = reason + " (" + Request.UserHostAddress + ")"; } return(logger.AddLog(ParentPortlet.Portlet.PortletTemplate.ID.AsGuid, PortalUser.Current.ID.AsGuid, userId, reason, DateTime.Now)); } catch (Exception ex) { if (PortalUser.Current.IsSiteAdmin) { ParentPortlet.ShowFeedback(FeedbackType.Error, Globalizer.GetGlobalizedString("CUS_BC_PL_ERROR_ADMIN") + ex); } else { ParentPortlet.ShowFeedback(FeedbackType.Error, Globalizer.GetGlobalizedString("CUS_BC_PL_ERROR_USER")); } return(false); } }
public void edit_Clicked(Object sender, EventArgs e) { Button clickedButton = (Button)sender; int row = Int32.Parse(clickedButton.ID.Substring(5)); int data = Convert.ToInt32(hf_Selected_Object.Value); List_able listObj = current_Viewable.returnListable(); List <string> variables = listObj.get_iterable_List()[row].getListOfKeys(); List <string> types = listObj.get_iterable_List()[row].getListofTypes(); Session["formable"] = master_Forms_List[data]; if (Convert.ToInt32(hf_Selected_Object.Value).Equals(0)) { Session["form_Obj"] = new List <Abstract_Iter_able> { listObj.get_iterable_List()[row] }; Session["viewableType"] = master_Forms_List[data].Name; Session["viewDesired"] = "Edit"; ParentPortlet.NextScreen("Objectable_View"); } else { Session["form_Obj"] = new List <Abstract_Iter_able> { listObj.get_iterable_List()[row] }; Session["viewableType"] = master_Forms_List[data].Name; Session["viewDesired"] = "Edit"; ParentPortlet.NextScreen("Objectable_View"); } }
protected void btnSave_Click(object sender, EventArgs e) { try { TabDropDownSettingMapperService tabSettingsService = new TabDropDownSettingMapperService(); TabDropDownSettings tabSettings = tabSettingsService.GetSettings(); if (tabSettings == null) { tabSettings = new TabDropDownSettings(); } tabSettings.EnableDropDown = cbxEnable.Checked; tabSettings.DisplayPages = cbxPages.Checked; tabSettings.DisplaySubSections = cbxSubSections.Checked; tabSettings.DisplaySubPagesPortlets = cbxSubPagesPortlets.Checked; tabSettings.DisplayAlphaOrder = cbxAlphaOrder.Checked; tabSettingsService.Save(tabSettings); ParentPortlet.ShowFeedback(FeedbackType.Message, "The settings were successfully saved."); } catch (Exception ex) { ExceptionManager.Publish(ex); ParentPortlet.ShowFeedback(FeedbackType.Error, "The system encountered an error saving the setting, please contact your ITS administrator."); } }
protected void btn_Back_Click(object sender, EventArgs e) { // clear out the edit screen for the next record //ddl_Approval_Status.SelectedValue = Session["approvalStatus"].ToString(); ParentPortlet.Session.Remove("EditId"); ParentPortlet.PreviousScreen(); }
protected void ImgbtnReloginClick(object sender, System.Web.UI.ImageClickEventArgs e) { var ibtn = (ImageButton)sender; Session["reloginCommand", PortletSessionScope.PortletShortcut] = ibtn.CommandArgument; ParentPortlet.NextScreen("Default"); }
protected void FacultySave_Click(object sender, EventArgs e) { bool rtn = false; string DateFormat = "yyyy-MM-dd HH:mm:ss"; string rightNow = DateTime.Now.ToString(DateFormat); ParentPortlet.NextScreen("ApprovalsScreen"); }
public void LoadPXCoursesScreen(object sender, EventArgs e) { //ClientScriptManager cs = Page.ClientScript; ////string script = "$('div#divLoading').addClass('show');"; //cs.RegisterClientScriptBlock(Page.GetType(), "loading", "showLoading()", true); ParentPortlet.NextScreen("PXCoursesScreen"); }
protected void LoadNextView(object sender, EventArgs e) { using (StreamWriter outputFile = new StreamWriter("c:\\temp" + @"\log.txt", true)) { outputFile.WriteLine("LoadDefaultView clicked from AddWidget_View "); } ParentPortlet.NextScreen("DefaultView"); }
protected bool InsertCourseDivisionRecs() { bool rtn = false; string DateFormat = "yyyy-MM-dd HH:mm:ss"; string rightNow = DateTime.Now.ToString(DateFormat); try { if (ddl_Approval_Status.SelectedValue.ToString() == "0") { ParentPortlet.ShowFeedback(FeedbackType.Message, "Please select an Approval Status before saving"); } else if (txt_Division.Text.Length < 2) { ParentPortlet.ShowFeedback(FeedbackType.Message, "Cannot process a Blank DIVISION_CDE"); } else { rtn = courseApprovalsView.InsertCourseDivisionRecords( ddl_Approval_Status.SelectedValue.ToString(), Session["FACappid"].ToString(), Session["FACidnum"].ToString(), Session["userlevel"].ToString(), Session["yearcode"].ToString(), Session["termcode"].ToString(), Session["FACfirstname"].ToString(), Session["FAClastname"].ToString(), rightNow, txt_Division.Text ); if (rtn) { //success ParentPortlet.ShowFeedback(FeedbackType.Success, "Success"); } else { //failure - do not change screens ParentPortlet.ShowFeedback(FeedbackType.Error, "Failure"); } } } catch (Exception ex) { errMsg.Visible = true; errMsg.ErrorMessage = ex.Message; ExceptionManager.Publish(ex); ParentPortlet.ShowFeedbackGlobalized(FeedbackType.Error, "Update Failed"); } finally { } return(rtn); }
protected bool InsertDisciplineRecs() { bool rtn = false; string DateFormat = "yyyy-MM-dd HH:mm:ss"; string rightNow = DateTime.Now.ToString(DateFormat); try { if (ddl_Approval_Status.SelectedValue.ToString() == "0") { ParentPortlet.ShowFeedback("Please select an Approval Status before saving"); } else { //rtn = approvalsView.InsertDisciplineRecords( // //Session["approvalCode"].ToString(), // ddl_Approval_Status.SelectedValue.ToString(), // Session["FACappid"].ToString(), // Session["FACidnum"].ToString(), // Session["yearcode"].ToString(), // Session["termcode"].ToString(), // Session["SM_appid"].ToString(), // Session["userLevel"].ToString(), // Session["CRSdesc"].ToString(), // Session["FACfirstname"].ToString(), // Session["FAClastname"].ToString(), // Session["FACinstructorType"].ToString(), // rightNow, // Session["FACinstdiv"].ToString() // ); if (rtn) { //success ParentPortlet.ShowFeedback("Success"); } else { //failure - do not change screens ParentPortlet.ShowFeedback("Failure"); } } } catch (Exception e) { errMsg.Visible = true; errMsg.ErrorMessage = e.Message; ExceptionManager.Publish(e); } finally { } return(rtn); }
protected bool UpdateDivisionRecs() { bool rtn = false; string DateFormat = "yyyy-MM-dd HH:mm:ss"; string rightNow = DateTime.Now.ToString(DateFormat); try { //if (txt_InstDiv.Text == "0" ) //{ // // die here, can't update division 0 // lbl_updateErrMsg.Text = "InstDivision = 0 --or-- No Approval Status is Selected"; //} //else //{ // //rtn = approveview.UpdateDivisionRecords( // // //Session["approvalCode"].ToString(), // // // DropDownList_approval.SelectedValue.ToString(), // // Session["inaaapppstdiv"].ToString(), // // Session["CRSappid"].ToString(), // // Session["idnum"].ToString(), // // Session["yearcode"].ToString(), // // Session["termcode"].ToString(), // // Session["userLevel"].ToString(), // // Session["CRSdesc"].ToString(), // // Session["firstname"].ToString(), // // Session["lastname"].ToString(), // // Session["insttype"].ToString(), // // rightNow, // // txt_InstDiv.Text // // //DropDownList_divisions.SelectedValue.ToString() // // ); //} } catch { } if (rtn) { //success lbl_updateErrMsg.Text = " "; ParentPortlet.NextScreen("ApprovalsScreen"); } else { //failure } return(rtn); }
protected bool UpdateFacultyDivisionRecs() { bool rtn = false; string DateFormat = "yyyy-MM-dd HH:mm:ss"; string rightNow = DateTime.Now.ToString(DateFormat); try { if (ddl_Approval_Status.SelectedValue.ToString() == "0") { ParentPortlet.ShowFeedback("Please select an Approval Status before saving"); } else if (txt_Division.Text.Length < 2) { ParentPortlet.ShowFeedback("Cannot process a blank Division"); } else { rtn = facultyApprovalsView.UpdateFacultyDivisionRecords( ddl_Approval_Status.SelectedValue.ToString(), Session["FACappid"].ToString(), Session["FACidnum"].ToString(), Session["userLevel"].ToString(), Session["FACfirstname"].ToString(), Session["FAClastname"].ToString(), Session["FACinstructorType"].ToString(), dp_Approval_Date.SelectedDate.ToString(DateFormat), dp_Expiration_Date.SelectedDate.ToString(DateFormat), rightNow, txt_Division.Text ); if (rtn) { //success ParentPortlet.ShowFeedback("Success"); } else { //failure ParentPortlet.ShowFeedback("it failed"); } } } catch (Exception ex) { errMsg.Visible = true; errMsg.ErrorMessage = ex.Message; ExceptionManager.Publish(ex); ParentPortlet.ShowFeedbackGlobalized("Update Failed"); } return(rtn); }
public void LoadApprovalsScreen(object sender, EventArgs e) { //if (Session["userLevel"].ToString() == "FacCredUser") //{ // ParentPortlet.NextScreen("UnauthorizedScreen"); //} //else if (Session["userLevel"].ToString() == "Approver1" || Session["userLevel"].ToString() == "Approver2" || Session["userLevel"].ToString() == "Approver3" ) //{ ParentPortlet.NextScreen("ApprovalsScreen"); //} }
public void LoadStatusScreen(object sender, EventArgs e) { if (Session["yearcode"].ToString() == "YR" || Session["termcode"].ToString() == "TRM") { ParentPortlet.ShowFeedback("Please select a Year and Term first :)"); } else { ParentPortlet.NextScreen("StatusScreen"); } }
public void LoadFacultyApprovalScreen(object sender, EventArgs e) { if (Session["userLevel"].ToString() == "FacCredUser") { ParentPortlet.ShowFeedback(FeedbackType.Error, "Not Authorized"); } else { ParentPortlet.NextScreen("FacultyApprovalScreen"); } }
protected void gv_Notes_RowCommand(object sender, GridViewCommandEventArgs e) { string ctrlName = ((Control)sender).ID; string cmdName = e.CommandName.ToString(); int rowIndex = Convert.ToInt32(e.CommandArgument); GridViewRow row = gv_Notes.Rows[rowIndex]; Session["FACfirstname"] = row.Cells[1].Text; Session["FAClastname"] = row.Cells[2].Text; Session["NOTEsubject"] = row.Cells[3].Text; Session["NOTEnote"] = row.Cells[4].Text; Session["NOTEcreated"] = row.Cells[5].Text; Session["NOTEstatus"] = row.Cells[6].Text; Session["NOTEaprdate"] = row.Cells[7].Text; Session["NOTEexpdate"] = row.Cells[8].Text; Session["NOTEupddate"] = row.Cells[9].Text; Session["NOTEupdby"] = row.Cells[10].Text; Session["CRSinstdiv"] = row.Cells[11].Text; Session["NOTEyear"] = row.Cells[12].Text; Session["NOTEterm"] = row.Cells[13].Text; Session["CRSappid"] = row.Cells[14].Text; Session["CRSdesc"] = row.Cells[15].Text; Session["FACidnum"] = row.Cells[16].Text; Session["FACappid"] = row.Cells[17].Text; Session["FACinstructorType"] = row.Cells[18].Text; Session["NOTEusername"] = row.Cells[19].Text; Session["FACssn"] = row.Cells[20].Text; Session["PXolddivcode"] = row.Cells[21].Text; // Session["NOTEid"] = row.Cells[22].Text; switch (cmdName) { case "gv_Notes_select": { if (row.Cells[17].Text == "no data found") { //die sucker ! } else { ParentPortlet.NextScreen("NotesUpdateScreen"); } } break; case "gv_Your_Approvals_Remarks": { } break; } }
protected void btn_Faculty_Refresh_Click(object sender, EventArgs e) { if (Session["userLevel"].ToString() == "FacCredAdmin") { facultyview.ExecuteFacultyReset(); ParentPortlet.ShowFeedback(FeedbackType.Success, "Faculty Successfully Refreshed"); } else { ParentPortlet.ShowFeedback(FeedbackType.Error, "FacCredAdmin must run this process"); } }
protected void btn_ADD_Click(object sender, EventArgs e) { UserAccessMapperService userAccessService = new UserAccessMapperService(); UserAccessNHibernate userAccess = new UserAccessNHibernate(); Guid newId = Guid.NewGuid(); //ADD A NEW DISCIPLINE userAccess = new UserAccessNHibernate { ID = newId, USER_ID = Session["SelectedUserID"].ToString(), FIRST_NAME = Session["SelectedUserFirstName"].ToString(), LAST_NAME = Session["SelectedUserLastName"].ToString(), SCHOOL_CDE = ddl_SchoolCodes.SelectedValue, }; if (ddl_SchoolCodes.SelectedValue.Length < 2) { ParentPortlet.ShowFeedback("Please Select a School Code before Saving."); return; } var nHibernateSession = new NHibernateFactory().GetSessionFactory().OpenSession(); try { using (var transaction = nHibernateSession.BeginTransaction()) { nHibernateSession.Save(userAccess); transaction.Commit(); ParentPortlet.ShowFeedback(FeedbackType.Success, "Access Successfully Added!"); } } catch (Exception exception) { var msg = PortalUser.Current.IsSiteAdmin ? "Selected Access was not added! Error: " + exception.Message : "Selected Access was not added! "; this.ParentPortlet.ShowFeedback(FeedbackType.Error, msg); ExceptionManager.Publish(exception); return; } finally { nHibernateSession.Close(); } InitScreen(); }
protected bool UpdateDisciplineRecs() { bool rtn = false; string DateFormat = "yyyy-MM-dd HH:mm:ss"; string rightNow = DateTime.Now.ToString(DateFormat); try { if (ddl_Approval_Status.SelectedValue.ToString() == "0") { ParentPortlet.ShowFeedback("Please select an Approval Status before saving"); } else { //rtn = approvalsView.UpdateDisciplineRecords( // ddl_Approval_Status.SelectedValue.ToString(), // Session["FACappid"].ToString(), // Session["FACidnum"].ToString(), // Session["yearcode"].ToString(), // Session["termcode"].ToString(), // Session["SM_appid"].ToString(), // Session["userLevel"].ToString(), // Session["CRSdesc"].ToString(), // Session["FACfirstname"].ToString(), // Session["FAClastname"].ToString(), // Session["FACinstructorType"].ToString(), // rightNow, // Session["FACinstdiv"].ToString() // ); if (rtn) { //success ParentPortlet.ShowFeedback("Success"); } else { //failure ParentPortlet.ShowFeedback("it failed"); } } } catch { ParentPortlet.ShowFeedback("Trouble!"); } return(rtn); }
protected void CourseSave_Click(object sender, EventArgs e) { bool rtn = false; string DateFormat = "yyyy-MM-dd HH:mm:ss"; string rightNow = DateTime.Now.ToString(DateFormat); try { //if (DropDownList_approval.SelectedValue.ToString() == "0") //{ // // die here, can't update division 0 // lbl_updateErrMsg.Text = "No Approval Status is Selected"; //} //else //{ // rtn = approveview.InsertUpdateApproval( // //Session["approvalCode"].ToString(), // DropDownList_approval.SelectedValue.ToString(), // Session["CRSappid"].ToString(), // Session["idnum"].ToString(), // Session["yearcode"].ToString(), // Session["termcode"].ToString(), // Session["userLevel"].ToString(), // Session["CRSdesc"].ToString(), // Session["firstname"].ToString(), // Session["lastname"].ToString(), // Session["insttype"].ToString(), // rightNow, // txt_InstDiv.Text // ); //} } catch { } if (rtn) { //success lbl_updateErrMsg.Text = " "; ParentPortlet.NextScreen("NotesScreen"); } else { //failure //lbl_updateErrMsg.Text = "not all fields were filled in. check the Approval Status"; } }
protected void gv_Approvals_RowCommand(object sender, GridViewCommandEventArgs e) { string ctrlName = ((Control)sender).ID; string cmdName = e.CommandName.ToString(); int rowIndex = Convert.ToInt32(e.CommandArgument); GridViewRow row = gv_Approvals.Rows[rowIndex]; Session["FACappid"] = (string)gv_Approvals.DataKeys[rowIndex]["FACappid"]; Session["FACidnum"] = (string)gv_Approvals.DataKeys[rowIndex]["FACidnum"]; // setting these here to properly load the next screen on select Session["FAClastname"] = row.Cells[1].Text; Session["FACfirstname"] = row.Cells[2].Text; Session["FACinstructorType"] = row.Cells[3].Text; Session["FACinstdiv"] = row.Cells[4].Text; //Session["FACappid"] = row.Cells[7].Text; //Session["FACidnum"] = row.Cells[8].Text; //Session["CRSappid"] = row.Cells[9].Text; //Session["CRSdesc"] = row.Cells[1].Text; if (Session["FACinstdiv"].ToString() == " ") { ParentPortlet.ShowFeedback("Cannot process a blank INST_DIV"); return; } else { switch (cmdName) { case "gv_Approvals_Approve": { if (Session["userLevel"].ToString() == "Approver1" || Session["userLevel"].ToString() == "Approver2" || Session["userLevel"].ToString() == "Approver3") { ParentPortlet.NextScreen("ApprovalUpdateScreen"); } } break; case "gv_Approvals_Note": { //Session["noteText"] = ""; //ParentPortlet.NextScreen("ApprovalUpdateScreen"); } break; } } }
protected void DivisionSave_Click(object sender, EventArgs e) { bool insertRtn = false; bool updateRtn = false; updateRtn = UpdateDivisionRecs(); if (Session["userLevel"].ToString() == "Approver1") { insertRtn = InsertDivisionRecs(); } ParentPortlet.NextScreen("ApprovalsScreen"); }
protected void RemoveSelectedSchoolCodeAccess() { bool rtn = view.DeleteOneUserDirectAccess(Session["SCA_ID"].ToString()); if (rtn) { // deleted ParentPortlet.ShowFeedback(FeedbackType.Message, "The selected record was successfully removed"); } else { // failed ParentPortlet.ShowFeedback(FeedbackType.Error, "Record was not deleted, please try again"); } }
protected bool InsertDivisionRecs() { bool rtn = false; string DateFormat = "yyyy-MM-dd HH:mm:ss"; string rightNow = DateTime.Now.ToString(DateFormat); try { if (txt_InstDiv.Text == "0" | DropDownList_approval.SelectedValue.ToString() == "0") { // die here, can't update division 0 lbl_updateErrMsg.Text = "InstDivision = 0 --or-- No Approval Status is Selected"; } else { //rtn = facultyApprovalsView.InsertDisciplineRecords( // //Session["approvalCode"].ToString(), // DropDownList_approval.SelectedValue.ToString(), // Session["FACappid"].ToString(), // Session["FACidnum"].ToString(), // Session["yearcode"].ToString(), // Session["termcode"].ToString(), // Session["SM_appid"].ToString(), // Session["userLevel"].ToString(), // Session["CRSdesc"].ToString(), // Session["FACfirstname"].ToString(), // Session["FAClastname"].ToString(), // Session["FACinstructorType"].ToString(), // rightNow, // txt_InstDiv.Text // //DropDownList_divisions.SelectedValue.ToString() // ); } } catch { } if (rtn) { //success lbl_updateErrMsg.Text = " "; ParentPortlet.NextScreen("ApprovalsScreen"); } return(rtn); }
protected void btn_Save_Click(object sender, EventArgs e) { bool rtn = false; string DateFormat = "yyyy-MM-dd HH:mm:ss"; string rightNow = DateTime.Now.ToString(DateFormat); try { if (ddl_Approval_Status.SelectedValue.ToString() == "0") { ParentPortlet.ShowFeedback("Please select an Approval Status before saving"); } else { //rtn = approvalsView.InsertUpdateApproval( // ddl_Approval_Status.SelectedValue.ToString(), // Session["FACappid"].ToString(), // Session["FACidnum"].ToString(), // Session["SM_appid"].ToString(), // Session["approvalYear"].ToString(), // Session["approvalTerm"].ToString(), // Session["userLevel"].ToString(), // Session["approvalCourse"].ToString(), // Session["FACfirstname"].ToString(), // Session["FAClastname"].ToString(), // Session["FACinstructorType"].ToString(), // rightNow, // Session["FACinstdiv"].ToString() // ); if (rtn) { //success ParentPortlet.ShowFeedback("Success"); } else { //failure ParentPortlet.ShowFeedback("Failed"); } } } catch { ParentPortlet.ShowFeedback("Trouble!"); } }