private bool canSignEducationContract() { Business.university.Faculty.FacultyReportsBusiness bsnFaculty = new Business.university.Faculty.FacultyReportsBusiness(); DataTable dtMartabe; dtMartabe = bsnFaculty.GetOstadInfoFromHR(Convert.ToInt32(Session[sessionNames.userID_StudentOstad])); if (dtMartabe.Rows.Count == 1) { if (dtMartabe.Rows[0]["nahveh_hamk_Sida"] != DBNull.Value && Convert.ToInt32(dtMartabe.Rows[0]["nahveh_hamk_sida"]) != 0) { if (Convert.ToInt32(dtMartabe.Rows[0]["nahveh_hamk_Sida"]) != 3) { showMessage("استاد گرامی، با توجه به عضویت شما در هیئت علمی دانشگاه، نیازی به تمدید قرارداد آموزشی به صورت الکترونیکی از طرف شما نمی باشد. "); return(false); } } else { showMessage("استاد گرامی نحوه همکاری شما با دانشگاه نامشخص است. لطفا با کارگزینی هیئت علمی تماس حاصل فرمایید. "); return(false); } } else { showMessage("استاد گرامی ورود شما به سامانه قرارداد با خطا همراه است. لطفا با کارگزینی هیئت علمی تماس حاصل فرمایید. "); return(false); } return(true); }
private bool setTeacherInformation() { Business.university.Faculty.FacultyReportsBusiness FRB = new Business.university.Faculty.FacultyReportsBusiness(); incompletedInf = ""; var dtHR = FRB.getOstadInfoFromPortal(Convert.ToInt64(Session[sessionNames.userID_StudentOstad])); if (dtHR.codeOstad > 0) { if (dtHR.name != "" && dtHR.family != "") { lblProfName.Text = dtHR.name + " " + dtHR.family; } else { return(false); incompletedInf += "نام و نام خانوادگی,"; } lblProfGender.Text = dtHR.sexIsMan ? "آقای " : "خانم "; return(true); } return(false); }
private void setTeacherSignature() { Business.university.Faculty.FacultyReportsBusiness FRB = new Business.university.Faculty.FacultyReportsBusiness(); var dtPeople = FRB.getOstadInfoFromPortal(teacherCode); DataTable dt; if (dtPeople.codeOstad > 0) { imgSignature1.Visible = true; int hrID = dtPeople.hrId; dt = bsn.getSignature(hrID, 1); if (dt.Rows.Count == 0) { Response.Redirect("../../../commonui/teacherIntro.aspx"); } else if (dt.Rows[0]["Signature"] == DBNull.Value) { Response.Redirect("../../../University/CooperationRequest/Teachers/contractsMain.aspx"); } if (dt.Rows[0]["Signature"] != DBNull.Value) { if (string.IsNullOrEmpty(hdnAgreementFile.Value)) { imgSignature1.ImageUrl = dt.Rows[0]["Signature"].ToString().Substring(1); } else { hdnAgreementFile.Value.ToString(); } } } }
protected void radGridtarh_ItemCommand(object sender, GridCommandEventArgs e) { switch (e.CommandName) { case "bookletDownload": IAUEC_Apps.Business.university.Faculty.FacultyReportsBusiness fb = new Business.university.Faculty.FacultyReportsBusiness(); var bookletData = fb.getBookletData(Convert.ToInt32(e.CommandArgument)); if (bookletData.Rows.Count > 0) { try { Response.ContentType = bookletData.Rows[0]["extention"].ToString(); // bookletData.Rows[0]["f_type"].ToString(); Response.Clear(); Response.AddHeader("content-disposition", "attachment; filename=" + bookletData.Rows[0]["ocode"].ToString() + "_" + bookletData.Rows[0]["dcode"].ToString() + "." + bookletData.Rows[0]["extention"].ToString()); Response.BinaryWrite(bookletData.Rows[0]["b_data"] as byte[]); HttpContext.Current.Response.Flush(); // Sends all currently buffered output to the client. HttpContext.Current.Response.SuppressContent = true; // Gets or sets a value indicating whether to send HTTP content to the client. HttpContext.Current.ApplicationInstance.CompleteRequest(); // Causes ASP.NET to bypass all events and filtering in the HTTP pipeline chain of execution and directly execute the EndRequest event. } catch (Exception ex) { } } break; } }
private void setBookletSource() { string term = drpdTerm.SelectedItem.Value; string tarh = drpdTarhdars.SelectedItem.Value; string dan = drpdDanesh.SelectedItem.Value; string resh = drpdResh.SelectedItem.Value; IAUEC_Apps.Business.university.Faculty.FacultyReportsBusiness fb = new Business.university.Faculty.FacultyReportsBusiness(); DataTable dt = fb.getBooklet(term, tarh == "1", dan, resh); radGridtarh.DataSource = dt; }
protected void Page_Load(object sender, EventArgs e) { bool hasAgreement = false; ucAgreement.teacherCode = Convert.ToInt32(Convert.ToInt32(Session[sessionNames.userID_StudentOstad])); ucAgreement.signature = chbConfirm.Checked; ucAgreement.userType = 1; if (!IsPostBack) { ucAgreement.teacherCode = Convert.ToInt64(Session[sessionNames.userID_StudentOstad]); Business.university.Faculty.FacultyReportsBusiness FRB = new Business.university.Faculty.FacultyReportsBusiness(); var ostadInf = FRB.getOstadInfoFromPortal(ucAgreement.teacherCode); if (ostadInf.codeOstad == 0) { showMessage("شما دسترسی به این قسمت را ندارید"); } else { ViewState[hrID] = ostadInf.hrId; Business.university.CooperationRequest.CooperationRequestBusiness bsn = new Business.university.CooperationRequest.CooperationRequestBusiness(); var agreements = bsn.getAgreementOfTeacher(ostadInf.codeOstad); if (agreements.Rows.Count == 1) { if (agreements.Rows[0]["agreementFile"] != DBNull.Value) { hasAgreement = true; } } if (hasAgreement) { showMessage("شما تفاهم نامه خود را امضا کرده اید و امکان مشاهده دوباره تفاهم نامه برای شما وجود ندارد."); return; } } } }