/// <summary> /// 连接测试 /// </summary> private void btnTestConn_Click(object sender, EventArgs e) { if (this.cmbSqlServers.Text == "" || this.cmbAllDataBases.Text == "" || this.txtUserName.Text == "" || this.txtPassword.Text == "") { MessageBox.Show("数据库名称及用户密码不能为空!", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information); return; } try { string strconn = "Data Source={0};User ID={1};Password={2};Initial Catalog={3};Pooling=true"; strconn = string.Format(strconn, this.cmbSqlServers.Text.Trim(), this.txtUserName.Text.Trim(), this.txtPassword.Text.Trim(), this.cmbAllDataBases.Text.Trim()); string strsql = string.Empty; strsql = "select 1"; BCommon bcomm = new BCommon(); if (bcomm.IsDBConn(strconn, strsql)) { MessageBox.Show("连接成功!", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("连接失败!", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information); } } catch (Exception ex) { MessageBox.Show(ex.ToString(), this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information); Logger.Error("数据库连接失败!", ex); } }
protected void btnAddComments_Click(object sender, EventArgs e) { try { BCommon objBCommon = new BCommon(); BECommon objBECommon = new BECommon(); objBECommon.IntTransID = Convert.ToInt64(AppSecurity.Decrypt(Session[BaseClass.EnumPageSessions.TransID].ToString())); objBECommon.IntUserID = Convert.ToInt32(Session[BaseClass.EnumPageSessions.USERID].ToString()); objBECommon.StrComments = txtComments.Text.ToString(); //objBECommon.StrddlComments = getSelectFlag().ToString(); objBECommon.StrddlComments = ddlFlags.SelectedValue.ToString(); objBECommon.intAlertID = Convert.ToInt32(ddlAlerts.SelectedValue.ToString()); objBCommon.BAddComments(objBECommon); objBECommon = null; objBECommon = null; txtComments.Text = string.Empty; gvComments.Rebind(); ddlFlags.SelectedValue = "-1"; // txtComments.Visible = false; ddlAlerts.Items.Clear(); } catch (Exception Ex) { throw Ex; } }
protected void BindGender() { try { BECommon objBECommon = new BECommon(); BCommon objBCommon = new BCommon(); objBECommon.IntUserID = Convert.ToInt32(Session[EnumPageSessions.USERID]); objBCommon.BGenderList(objBECommon); if (objBECommon.DsResult.Tables[0].Rows.Count > 0) { //ddlGender.Items.Clear(); //ddlGender.DataValueField = "GenderID"; //ddlGender.DataTextField = "GenderName"; //ddlGender.DataSource = objBECommon.DsResult.Tables[0]; //ddlGender.DataBind(); } if (objBECommon.DsResult.Tables[1].Rows.Count > 0) { //lblGender.Text =CommonFunctions.CheckNullValue(objBECommon.DsResult.Tables[1].Rows[0]["GenderName"].ToString()); //ddlGender.SelectedValue = objBECommon.DsResult.Tables[1].Rows[0]["GenderID"].ToString(); } } catch (Exception) { // ErrorLog.WriteError(Ex); } }
protected void GetStudentDetails(int StudentID) { BECommon objBECommon = new BECommon(); BCommon objBCommon = new BCommon(); objBECommon.IntStudentID = StudentID; objBCommon.BGetStudentDetails(objBECommon); if (objBECommon.DtResult != null && objBECommon.DtResult.Rows.Count > 0) { lblstudentfirstname.Text = objBECommon.DtResult.Rows[0]["FirstName"].ToString(); lblStudentLastName.Text = objBECommon.DtResult.Rows[0]["LastName"].ToString(); lblEmailID.Text = objBECommon.DtResult.Rows[0]["EmailAddress"].ToString(); lblPhoneNumber.Text = objBECommon.DtResult.Rows[0]["PhoneNumber"].ToString(); lblTimeZone.Text = objBECommon.DtResult.Rows[0]["TimeZone"].ToString(); lblrole.Text = objBECommon.DtResult.Rows[0]["Role_Name"].ToString(); lblSpecialNeeds.Text = objBECommon.DtResult.Rows[0]["SpecialNeeds"].ToString(); if (lblSpecialNeeds.Text == "Yes") { trcomments.Visible = true; if (objBECommon.DtResult.Rows[0]["Comments"] != DBNull.Value) { lblComments.Text = objBECommon.DtResult.Rows[0]["Comments"].ToString(); } } else { trcomments.Visible = false; } } }
protected void btnSubmit_Click(object sender, EventArgs e) { try { BECommon objBECommon = new BECommon(); BCommon objBCommon = new BCommon(); objBECommon.TransID = txtTransactionID.Text; objBECommon.GotoMeetingID = txtGotoMeeting.Text; objBCommon.BUpdateGotoMeeting(objBECommon); if (objBECommon.IntstatusFlag == 0) { lblSuccess.Text = "GoTOMeeting ID updated successfully."; } if (objBECommon.IntstatusFlag == 1) { lblSuccess.Text = "Transaction ID doesn't exists"; } } catch (Exception) { lblSuccess.Text = "Transaction ID doesn't exists"; } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { BECommon objBECommon = new BECommon(); BCommon objBCommon = new BCommon(); objBECommon.iTimeZoneID = Convert.ToInt32(Session["TimeZoneID"].ToString()); objBCommon.BGetTimeDelay(objBECommon); dtpstartdate.SelectedDate = DateTime.UtcNow.AddMinutes(objBECommon.IntResult); dtpEnddate.SelectedDate = DateTime.UtcNow.AddMinutes(objBECommon.IntResult); } this.Page.Title = EnumPageTitles.APPNAME + EnumPageTitles.EXAMPROVIDER_EXAMPROVIDERREPORTS; ((LinkButton)this.Page.Master.FindControl("lnkReports")).CssClass = "main_menu_active"; if (Request.QueryString != null && Request.QueryString.ToString() != null) { int intReportID = Convert.ToInt32(AppSecurity.Decrypt(Request.QueryString["ReportID"].ToString())); int intTypeID = Convert.ToInt32(AppSecurity.Decrypt(Request.QueryString["ReportTypeID"].ToString())); if (intTypeID == 1) { trSearchCriteria1.Visible = true; // trSearchCriteria2.Visible = false; } else { trSearchCriteria1.Visible = false; // trSearchCriteria2.Visible = true; } } }
public void setExamDetailsForExamityMeeting(string transID, HiddenField isLockDown, HiddenField examPassword, HiddenField examDomain, HiddenField hdnExamSecurity) { try { BECommon objBECommon = new BECommon(); objBECommon.IntTransID = Int64.Parse(AppSecurity.Decrypt(transID)); BCommon bCommon = new BCommon(); bCommon.BGetExamDetailsForExamityMeeting(objBECommon); if (objBECommon.DsResult != null && objBECommon.DsResult.Tables.Count > 0) { var islockDown = (objBECommon.DsResult.Tables[0].Rows[0]["IsLockDown"]); isLockDown.Value = islockDown.ToString(); var isPasswordExists = (objBECommon.DsResult.Tables[0].Rows[0]["ExamPassword"]); examPassword.Value = isPasswordExists.ToString(); examDomain.Value = objBECommon.DsResult.Tables[0].Rows[0]["ExamDomain"].ToString(); var examSecurity = (objBECommon.DsResult.Tables[0].Rows[0]["ExamSecurity"]).ToString(); hdnExamSecurity.Value = examSecurity == "4" ? "L3" : examSecurity; } } catch (Exception) { } }
protected void Page_Load(object sender, EventArgs e) { if (Session[BaseClass.EnumPageSessions.USERID] != null) { lblUser.Text = Session["UserName"].ToString(); } else { Response.Redirect(BaseClass.EnumAppPage.LOGIN, false); } if (Session["RoleID"].ToString() != "4") { Response.Redirect(BaseClass.EnumAppPage.ERRORMESSAGE, true); } if (Session["TimeZone"] != null) { BECommon objBECommon = new BECommon(); BCommon objBCommon = new BCommon(); objBECommon.iTimeZoneID = Convert.ToInt32(Session["TimeZoneID"]); objBCommon.BGetTimeDelay(objBECommon); //lblDate.Text = "Date: " + CommonFunctions.GetTime(DateTime.UtcNow, Session["TimeZone"].ToString()).ToString(); //lblDate.Text = "Date: " + DateTime.UtcNow.AddMinutes(objBECommon.IntResult).ToString(); //lbtnTimeZone.Text = "[ " + Session["TimeZone"].ToString() + " ]"; //lblTimeZone.Text = "[ <b>Time Zone : </b>" + Session["TimeZone"].ToString() + " ]"; string[] strtimezone = Session["TimeZone"].ToString().Split('('); lbtnTimeZone.Text = strtimezone[0].ToString() + " : " + DateTime.UtcNow.AddMinutes(objBECommon.IntResult).ToString("MM/dd/yyyy HH:mm tt"); } else { Response.Redirect(BaseClass.EnumAppPage.LOGIN, false); } }
protected void btnSaveTimeZone_Click(object sender, EventArgs e) { if (Page.IsValid) { BUser objBUser = new BUser(); BEUser objBEUser = new BEUser(); objBEUser.StrFirstName = txtFirstName.Text; objBEUser.StrLastName = txtLastName.Text; objBEUser.StrEmail = txtEmail.Text; //objBEUser.StrGender = ddlGender.SelectedValue; objBEUser.strTimeZone = ddlTimeZone.SelectedValue; objBEUser.IntUserID = Convert.ToInt32(Session[EnumPageSessions.USERID]); objBUser.BUpdateTimeZone(objBEUser); if (objBEUser.IntResult == 1) { Session["TimeZoneID"] = ddlTimeZone.SelectedValue.ToString(); Session["TimeZone"] = ddlTimeZone.SelectedItem.Text.ToString(); LinkButton lbtnTimeZone = this.Master.FindControl("lbtnTimeZone") as LinkButton; //Label lblDate = this.Master.FindControl("lblDate") as Label; //lbtnTimeZone.Text = "[ " + Session["TimeZone"].ToString() + " ]"; BECommon objBECommon = new BECommon(); BCommon objBCommon = new BCommon(); objBECommon.iTimeZoneID = Convert.ToInt32(Session["TimeZoneID"]); objBCommon.BGetTimeDelay(objBECommon); //lblDate.Text = "Date: " + DateTime.UtcNow.AddMinutes(objBECommon.IntResult).ToString(); //lblsucc.Text = "Time Zone has been updated successfully."; string[] strtimezone = Session["TimeZone"].ToString().Split('('); lbtnTimeZone.Text = strtimezone[0].ToString() + " : " + DateTime.UtcNow.AddMinutes(objBECommon.IntResult).ToString("MM/dd/yyyy HH:mm tt"); Session["UserName"] = txtFirstName.Text + " " + txtLastName.Text + " [ Auditor ]"; Label lblUserName = this.Master.FindControl("lblUser") as Label; lblUserName.Text = txtFirstName.Text + " " + txtLastName.Text + " [ Auditor ]"; lblsucc.Text = "<img src='../Images/yes.png' align='middle'/> <font color='#00C000'>" + Resources.ResMessages.MyProfile_TimeZoneUpdateSuccess + "</font>"; } else { lblsucc.Text = "<img src='../Images/no.png'align='middle'/> <font color='red'>" + Resources.ResMessages.MyProfile_TimeZoneUpdateFailed + "</font>"; } BindTimeZone(); //BindGender(); BindDemographicDetails(); lblTimeZone.Visible = true; lblFirstName.Visible = true; lblLastName.Visible = true; lblEmail.Visible = true; //lblGender.Visible = true; ddlTimeZone.Visible = false; //ddlGender.Visible = false; txtFirstName.Visible = false; txtLastName.Visible = false; txtEmail.Visible = false; tdSaveTimeZone.Visible = false; tdEditTimeZon.Visible = true; // Response.Redirect("myprofile.aspx"); } }
protected void BindDetails() { try { BECommon objBECommon = new BECommon(); BCommon objBCommon = new BCommon(); if (Request.QueryString["TransID"] != null) { ViewState[BaseClass.EnumPageSessions.TransID] = Convert.ToInt64(AppSecurity.Decrypt(Request.QueryString["TransID"].ToString())); objBECommon.IntTransID = Convert.ToInt64(AppSecurity.Decrypt(Request.QueryString["TransID"].ToString())); objBECommon.IntUserID = Convert.ToInt32(Session[BaseClass.EnumPageSessions.USERID]); objBCommon.BGetStudentExamDetails(objBECommon); if (objBECommon.DsResult != null && objBECommon.DsResult.Tables[0].Rows.Count > 0) { lblTransactionID.Text = AppSecurity.Decrypt(Request.QueryString["TransID"].ToString()); lblStudentName.Text = objBECommon.DsResult.Tables[0].Rows[0]["Name"].ToString(); lblCourseName.Text = objBECommon.DsResult.Tables[0].Rows[0]["CourseName"].ToString(); lblExamName.Text = objBECommon.DsResult.Tables[0].Rows[0]["ExamName"].ToString(); lblDAte.Text = objBECommon.DsResult.Tables[0].Rows[0]["ExamDate"].ToString(); lblSlot.Text = objBECommon.DsResult.Tables[0].Rows[0]["TimeDuration"].ToString(); } } } catch (Exception ex) { throw ex; } }
protected void Page_Load(object sender, EventArgs e) { if (Session[BaseClass.EnumPageSessions.USERID] != null) { lblUser.Text = Session["UserName"].ToString(); } else { Response.Redirect(BaseClass.EnumAppPage.LOGIN, false); } if (Session["TimeZone"] != null) { //lblDate.Text = "Date: " + CommonFunctions.GetTime(DateTime.UtcNow, Session["TimeZone"].ToString()).ToString(); BECommon objBECommon = new BECommon(); BCommon objBCommon = new BCommon(); objBECommon.iTimeZoneID = Convert.ToInt32(Session["TimeZoneID"]); objBCommon.BGetTimeDelay(objBECommon); lblDate.Text = "Date: " + DateTime.UtcNow.AddMinutes(objBECommon.IntResult).ToString(); lbtnTimeZone.Text = "[ " + Session["TimeZone"].ToString() + " ]"; // lblTimeZone.Text = "[ <b>Time Zone : </b>" + Session["TimeZone"].ToString() + " ]"; } else { Response.Redirect(BaseClass.EnumAppPage.LOGIN, false); } }
private void txtWarehouseCode_Leave(object sender, EventArgs e) { BCommon bCommon = new BCommon(); string warehouseCode = txtWarehouseCode.Text.Trim(); if (warehouseCode != "") { BaseMaster baseMaster = bCommon.GetBaseMaster("WAREHOUSE", warehouseCode); if (baseMaster != null) { txtWarehouseCode.Text = baseMaster.Code; txtWarehouseName.Text = baseMaster.Name; } else { MessageBox.Show("仓库编号不存在。", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning); txtWarehouseCode.Text = ""; txtWarehouseName.Text = ""; txtWarehouseCode.Focus(); } } else { txtWarehouseName.Text = ""; } }
protected void btnAddComments_Click(object sender, EventArgs e) { if (Page.IsValid) { try { BCommon objBCommon = new BCommon(); BECommon objBECommon = new BECommon(); objBECommon.IntTransID = Convert.ToInt64(AppSecurity.Decrypt(Request.QueryString["TransID"].ToString())); objBECommon.IntUserID = Convert.ToInt32(Session[EnumPageSessions.USERID].ToString()); objBECommon.StrComments = txtComments.Text.ToString(); objBECommon.StrddlComments = getSelectFlag().ToString(); objBECommon.intAlertID = Convert.ToInt32(ddlAlerts.SelectedValue.ToString()); objBCommon.BAddComments(objBECommon); objBECommon = null; objBCommon = null; txtComments.Text = string.Empty; gvComments.Rebind(); } catch (Exception Ex) { throw Ex; } } }
public async Task <string> Get(string template_addr, string date, string ConsensusType = "primary-pow") { Result <List <MBlockPa> > res = new Result <List <MBlockPa> >(); var tdate = DateTime.Now; if (!DateTime.TryParse(date, out tdate) || string.IsNullOrEmpty(date)) { res = new Result <List <MBlockPa> >(ResultCode.Fail, "Parameter date is not a DateTime type.", null); return(JsonConvert.SerializeObject(res)); } BCommon bll = new BCommon(connStr); try { var query = bll.GetBlockDailyReward(template_addr, date, ConsensusType); var lst = (await query).ToList(); if (lst.Count > 0) { res = new Result <List <MBlockPa> >(ResultCode.Ok, null, lst); } else { res = new Result <List <MBlockPa> >(ResultCode.NoRecord, null, null); } return(JsonConvert.SerializeObject(res)); } catch (Exception ex) { res = new Result <List <MBlockPa> >(ResultCode.Fail, ex.Message, null); return(JsonConvert.SerializeObject(res)); } }
protected void getUploadFiles() { try { BECommon objBECommon = new BECommon(); BCommon objBCommon = new BCommon(); if (Request.QueryString["ExamID"] != null) { objBECommon.iID = Convert.ToInt32(Request.QueryString["ExamID"].ToString()); objBCommon.BGetExamUploadFiles(objBECommon); if (objBECommon.DsResult != null && objBECommon.DsResult.Tables.Count > 0 && objBECommon.DsResult.Tables[0].Rows.Count > 0) { gvUploadFiles.DataSource = objBECommon.DsResult.Tables[0]; gvUploadFiles.DataBind(); } else { gvUploadFiles.DataSource = new string[] { } }; } } catch (Exception) { } }
protected void GetStudentDetails(int StudentID) { BECommon objBECommon = new BECommon(); BCommon objBCommon = new BCommon(); objBECommon.IntStudentID = StudentID; objBCommon.BGetStudentDetails(objBECommon); if (objBECommon.DtResult != null) { if (objBECommon.DtResult.Rows.Count > 0) { lblstudentfirstname.Text = objBECommon.DtResult.Rows[0]["FirstName"].ToString() + ' ' + objBECommon.DtResult.Rows[0]["LastName"].ToString(); lblEmail.Text = objBECommon.DtResult.Rows[0]["EmailAddress"].ToString(); lblPhoneNumber.Text = objBECommon.DtResult.Rows[0]["PhoneNumber"].ToString(); lblTimeZone.Text = objBECommon.DtResult.Rows[0]["TimeZone"].ToString(); lblSpecialNeeds.Text = objBECommon.DtResult.Rows[0]["SpecialNeeds"].ToString(); string imgpath = objBECommon.DtResult.Rows[0]["PhotoIdentity"].ToString(); if (imgpath != "") { //imgstudent.ImageUrl = "~/Student/Student_Identity/" + imgpath.Substring(3).ToString(); imgstudent.ImageUrl = new AppSecurity().ImageToBase64(imgpath.Substring(3).ToString()); } lblComments.Text = CommonFunctions.CheckNullValue(objBECommon.DtResult.Rows[0]["Comments"].ToString()); } } }
protected void BindExamDetails(Int64 TransactionID) { BECommon objBECommon = new BECommon(); BCommon objBCommon = new BCommon(); objBECommon.IntTransID = TransactionID; objBECommon.IntUserID = Convert.ToInt32(Session[BaseClass.EnumPageSessions.USERID]); objBCommon.BGetStudentExamDetails(objBECommon); if (objBECommon.DsResult.Tables[0].Rows.Count > 0) { lblStudentName.Text = objBECommon.DsResult.Tables[0].Rows[0]["Name"].ToString(); lblCourseName.Text = objBECommon.DsResult.Tables[0].Rows[0]["CourseName"].ToString(); lblExamName.Text = objBECommon.DsResult.Tables[0].Rows[0]["ExamName"].ToString(); lblDAte.Text = objBECommon.DsResult.Tables[0].Rows[0]["ExamDate"].ToString(); lblTime.Text = objBECommon.DsResult.Tables[0].Rows[0]["TimeDuration"].ToString(); lblStatus.Text = objBECommon.DsResult.Tables[0].Rows[0]["StatusName"].ToString(); if (objBECommon.DsResult.Tables[0].Rows[0]["OriginalFileName"] != null && objBECommon.DsResult.Tables[0].Rows[0]["OriginalFileName"].ToString() != string.Empty) { lnlFile.Visible = true; lblFile.Visible = false; lnlFile.Text = objBECommon.DsResult.Tables[0].Rows[0]["OriginalFileName"].ToString(); } else { lnlFile.Visible = false; lblFile.Visible = true; lblFile.Text = "N/A"; } } }
protected void Page_Load(object sender, EventArgs e) { try { BECommon objBECommon = new BECommon(); BCommon objBCommon = new BCommon(); if (Request.QueryString["TransID"] != null) { this.Page.Title = EnumPageTitles.APPNAME + EnumPageTitles.STUDENT_SCHEDULEDetails; //((LinkButton)this.Page.Master.FindControl("lnkReschedule")).CssClass = "main_menu_active"; objBECommon.IntTransID = Convert.ToInt64(AppSecurity.Decrypt(Request.QueryString["TransID"].ToString())); objBECommon.IntUserID = Convert.ToInt32(Session[BaseClass.EnumPageSessions.USERID]); objBCommon.BGetStudentExamDetails(objBECommon); if (objBECommon.DsResult != null) { if (objBECommon.DsResult.Tables[0].Rows.Count > 0) { lblTransactionID.Text = AppSecurity.Decrypt(Request.QueryString["TransID"].ToString()); lblStudentName.Text = objBECommon.DsResult.Tables[0].Rows[0]["Name"].ToString(); lblCourseName.Text = objBECommon.DsResult.Tables[0].Rows[0]["CourseName"].ToString(); lblExamName.Text = objBECommon.DsResult.Tables[0].Rows[0]["ExamName"].ToString(); lblDAte.Text = objBECommon.DsResult.Tables[0].Rows[0]["ExamDate"].ToString(); lblSlot.Text = objBECommon.DsResult.Tables[0].Rows[0]["TimeDuration"].ToString(); //lblHead.Text = "Exam Cancellation Request"; } } lblInfo.Text = "<img src='../Images/yes.png'align='middle'/> <font color='#00C000'>" + "Appointment " + Resources.ResMessages.AppointmentDeleteSuccess + "</font>"; } } catch (Exception) { //ErrorLog.WriteError(Ex); } }
protected void gvComments_DeleteCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e) { DataTable objDT = (DataTable)ViewState["ALERTS"]; if (e.CommandName == "DELETE") { for (int i = 0; i < objDT.Rows.Count; i++) { if (e.CommandArgument.ToString() == objDT.Rows[i][0].ToString()) { objDT.Rows.RemoveAt(i); objDT.AcceptChanges(); BECommon objBECommon = new BECommon(); BCommon objBCommon = new BCommon(); objBECommon.IntTransID = Convert.ToInt64(AppSecurity.Decrypt(Request.QueryString["TransID"].ToString())); objBECommon.intTypeID = 0; objBECommon.intCommentID = Convert.ToInt32(e.CommandArgument); objBECommon.StrComments = string.Empty; objBCommon.BDeleteUpdateAlerts(objBECommon); } ViewState["ALERTS"] = objDT; gvComments.DataSource = objDT; gvComments.DataBind(); } } }
protected void ddlFlags_SelectedIndexChanged(object sender, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e) { txtComments.Visible = false; if (!string.IsNullOrEmpty(ddlFlags.SelectedValue.ToString())) { BECommon objBEComon = new BECommon(); BCommon objBCommon = new BCommon(); objBEComon.intRoleID = Convert.ToInt32(Session["RoleID"].ToString()); objBEComon.intAlertID = Convert.ToInt32(ddlFlags.SelectedValue.ToString()); objBCommon.BGetAlerts(objBEComon); ddlAlerts.DataSource = objBEComon.DtResult; ddlAlerts.DataValueField = "AlertID"; ddlAlerts.DataTextField = "AlertText"; ddlAlerts.DataBind(); } else { ddlAlerts.Items.Clear(); } //if (ddlFlags.SelectedIndex == 0) //{ // txtComments.Visible = false; //} }
protected void LoadDataTable() { try { BECommon objBECommon = new BECommon(); BCommon objBCommon = new BCommon(); // objBECommon.IntStudentID = EnrollID; objBCommon.BAdminGetEnrollStudentDetails(objBECommon); if (objBECommon.DsResult.Tables[0].Rows.Count > 0) { gvExamStatus.DataSource = objBECommon.DsResult.Tables[0]; gvExamStatus.Rebind(); } else { gvExamStatus.DataSource = new string[] { }; gvExamStatus.DataBind(); } } catch (Exception) { } }
protected void lnklaunch_Click(object sender, EventArgs e) { BECommon objBECommon = new BECommon(); BCommon objBCommon = new BCommon(); objBECommon.IntTransID = Convert.ToInt64(AppSecurity.Decrypt(Session[BaseClass.EnumPageSessions.TransID].ToString())); objBECommon.IntstatusFlag = 3; objBCommon.BReenableBeginExamstatus(objBECommon); }
public string isLockDownBrowserFeatured() { BECommon objBECommon = new BECommon(); BCommon objBCommon = new BCommon(); objBCommon.BGetClientDetails(objBECommon); return(objBECommon.DsResult.Tables[0].Rows[0]["LockdownBrowser"].ToString()); }
protected void BindExamDetails(Int64 TransactionID) { BECommon objBECommon = new BECommon(); BCommon objBCommon = new BCommon(); objBECommon.IntTransID = TransactionID; objBECommon.IntUserID = Convert.ToInt32(Session[BaseClass.EnumPageSessions.USERID]); objBCommon.BGetStudentExamDetails(objBECommon); if (objBECommon.DsResult.Tables[0].Rows.Count > 0) { lblTransID.Text = TransactionID.ToString(); lblStudentName.Text = objBECommon.DsResult.Tables[0].Rows[0]["Name"].ToString(); lblCourseName.Text = objBECommon.DsResult.Tables[0].Rows[0]["CourseName"].ToString(); lblExamName.Text = objBECommon.DsResult.Tables[0].Rows[0]["ExamName"].ToString(); lblDAte.Text = objBECommon.DsResult.Tables[0].Rows[0]["ExamDate"].ToString(); lblTime.Text = objBECommon.DsResult.Tables[0].Rows[0]["TimeDuration"].ToString(); lblStatus.Text = objBECommon.DsResult.Tables[0].Rows[0]["StatusName"].ToString(); if (objBECommon.DsResult.Tables[0].Rows[0]["OriginalFileName"] != null && objBECommon.DsResult.Tables[0].Rows[0]["OriginalFileName"].ToString() != string.Empty) { lnlFile.Visible = true; lblFile.Visible = false; lnlFile.Text = objBECommon.DsResult.Tables[0].Rows[0]["OriginalFileName"].ToString(); } else { lnlFile.Visible = false; lblFile.Visible = true; lblFile.Text = "N/A"; } if (Type == "0") { lblInfo.Text = "<img src='../Images/yes.png'align='middle'/> <font color='#00C000'>" + "Appointment scheduled successfully."; } else if (Type == "1") { lblInfo.Text = "<img src='../Images/yes.png'align='middle'/> <font color='#00C000'>" + "Appointment rescheduled successfully."; } else { lblInfo.Text = "<img src='../Images/yes.png'align='middle'/> <font color='#00C000'>" + "Appointment scheduled successfully."; } if (objBECommon.DsResult.Tables[6] != null) { if (objBECommon.DsResult.Tables[6].Rows.Count > 0) { int leval = Convert.ToInt32(objBECommon.DsResult.Tables[6].Rows[0]["secirtyType"].ToString()); bool isexamiFACE = Convert.ToBoolean(objBECommon.DsResult.Tables[6].Rows[0]["IsexamiFACE"].ToString()); if (leval == 5 || isexamiFACE) { trautoconnect.Visible = true; } } } } }
public DateTime GetUserCurrentTime() { BECommon objBECommon = new BECommon(); BCommon objBCommon = new BCommon(); objBECommon.iTimeZoneID = Convert.ToInt32(Session["TimeZoneID"]); objBCommon.BGetTimeDelay(objBECommon); return(DateTime.Parse(DateTime.UtcNow.AddMinutes(objBECommon.IntResult).ToString("MM/dd/yyyy HH:mm tt"))); }
public string isAllowAttemptsFeatured() { BECommon objBECommon = new BECommon(); BCommon objBCommon = new BCommon(); objBCommon.BGetClientDetails(objBECommon); return(objBECommon.DsResult.Tables[0].Rows[0]["MaxAttemptsFeatured"].ToString()); }
protected void btnReject_Click(object sender, EventArgs e) { try { if (Request.QueryString["type"].ToString() == "0") { BECommon objBECommon = new BECommon(); BCommon objBCommon = new BCommon(); objBECommon.IntTransID = Convert.ToInt64(AppSecurity.Decrypt(Request.QueryString["TransID"].ToString())); objBCommon.BGetExamProviderDetails(objBECommon); if (objBECommon.DsResult.Tables[0].Rows.Count > 0) { // objBECommon.StrEmailID = objBECommon.DsResult.Tables[0].Rows[0]["StudentEmail"].ToString(); objBECommon.IntUserID = Convert.ToInt32(objBECommon.DsResult.Tables[0].Rows[0]["UserID"]); objBECommon.IntProviderID = Convert.ToInt32(objBECommon.DsResult.Tables[0].Rows[0]["ProviderUserID"]); // objBECommon.strProviderEmailID = objBECommon.DsResult.Tables[0].Rows[0]["ExamProviderEmail"].ToString(); } Approve_Transaction(0); try { //EmailMsg obj = new EmailMsg(); //obj.ExamApprovedStudent(Convert.ToInt32(AppSecurity.Decrypt(Request.QueryString["TransID"].ToString())), "Rejected"); //obj.ExamApprovedProvider(Convert.ToInt32(AppSecurity.Decrypt(Request.QueryString["TransID"].ToString())), "Rejected"); //obj = null; BEMail objBEMail = new BEMail(); BMail objBMail = new BMail(); objBEMail.IntTransID = objBECommon.IntTransID; string FYI = "FYI"; string mail = "Mail"; if (mail == "Mail") { //objBEMail.IntUserID = objBECommon.IntUserID; //objBEMail.StrTemplateName = BaseClass.EnumEmails.ExamRejectedbyAuditor.ToString(); //objBMail.BSendEmail(objBEMail); } if (FYI == "FYI") { //objBEMail.IntUserID = objBECommon.IntProviderID; //objBEMail.StrTemplateName = BaseClass.EnumEmails.ExamRejectedbyAuditorFYI.ToString(); //objBMail.BSendEmail(objBEMail); } } catch (Exception ex) { throw ex; } } } catch (Exception ex) { throw ex; } }
protected void btnSaveTimeZone_Click(object sender, EventArgs e) { if (Page.IsValid) { BUser objBUser = new BUser(); BEUser objBEUser = new BEUser(); objBEUser.StrFirstName = txtFirstName.Text; objBEUser.StrLastName = txtLastName.Text; objBEUser.StrEmail = txtEmail.Text; objBEUser.strPhoneNumber = txtPhoneNumber.Text; objBEUser.strTimeZone = ddlTimeZone.SelectedValue; objBEUser.IntUserID = Convert.ToInt32(Session[EnumPageSessions.USERID]); //11sep2017----removing plus sign from the country code string[] ArrCodes = null; if (!string.IsNullOrEmpty(txtCountryCode.Text)) { ArrCodes = txtCountryCode.Text.Split('+'); } if (ArrCodes != null) { objBEUser.CountryCode = ArrCodes[0]; } objBUser.BUpdateTimeZone(objBEUser); if (objBEUser.IntResult == 1) { Session["TimeZoneID"] = ddlTimeZone.SelectedValue.ToString(); Session["TimeZone"] = ddlTimeZone.SelectedItem.Text.ToString(); LinkButton lbtnTimeZone = this.Master.FindControl("lbtnTimeZone") as LinkButton; BECommon objBECommon = new BECommon(); BCommon objBCommon = new BCommon(); objBECommon.iTimeZoneID = Convert.ToInt32(Session["TimeZoneID"]); objBCommon.BGetTimeDelay(objBECommon); string[] strtimezone = Session["TimeZone"].ToString().Split('('); lbtnTimeZone.Text = strtimezone[0].ToString() + " : " + DateTime.UtcNow.AddMinutes(objBECommon.IntResult).ToString("MM/dd/yyyy hh:mm tt"); Session["UserName"] = txtFirstName.Text + " " + txtLastName.Text + " [ Student ]"; Label lblUserName = this.Master.FindControl("lblUser") as Label; lblUserName.Text = txtFirstName.Text + " " + txtLastName.Text + " [ Student ]"; lblsucc.Text = "<img src='../Images/yes.png' align='middle'/> <font color='#00C000'>" + Resources.ResMessages.MyProfile_TimeZoneUpdateSuccess + "</font>"; } else { lblsucc.Text = "<img src='../Images/no.png'align='middle'/> <font color='red'>" + Resources.ResMessages.MyProfile_TimeZoneUpdateFailed + "</font>"; } BindTimeZone(); BindDemographicDetails(); lblformat.Visible = false; trDemographicEdit.Visible = false; trDemographicView.Visible = true; this.ValidatePhotoIdentity(); ScriptManager.RegisterStartupScript(this, this.GetType(), "NotSaved", "document.getElementById('" + lblsucc.ClientID.ToString() + "').focus();", true); } }
/// <summary> /// init 页面初始化 /// </summary> private void FrmLogin_Load(object sender, EventArgs e) { this.TransparencyKey = Color.WhiteSmoke; panelDBConfig.BackColor = Color.FromArgb(65, 204, 212, 230); try { string strconn = string.Empty; strconn = AppXmlTool.ReadXmlFiles("ConnectionString"); string ConStringEncrypt = AppXmlTool.ReadXmlFiles("ConStringEncrypt"); if (ConStringEncrypt == "true") { strconn = DESEncrypt.Decrypt(strconn); } string[] ary = strconn.Split(';'); if (ary.Length > 3) { this.cmbSqlServers.Text = ary[0].Substring(ary[0].IndexOf("=") + 1).Trim(); this.txtUserName.Text = ary[1].Substring(ary[1].IndexOf("=") + 1).Trim(); this.txtPassword.Text = ary[2].Substring(ary[2].IndexOf("=") + 1).Trim(); this.cmbAllDataBases.Text = ary[3].Substring(ary[3].IndexOf("=") + 1).Trim(); } } catch (Exception ex) { Logger.Error("数据库配置文件文读取异常!", ex); } try { string strconn = "Data Source={0};User ID={1};Password={2};Initial Catalog={3};Pooling=true"; strconn = string.Format(strconn, this.cmbSqlServers.Text.Trim(), this.txtUserName.Text.Trim(), this.txtPassword.Text.Trim(), this.cmbAllDataBases.Text.Trim()); string strsql = string.Empty; strsql = "select 1"; BCommon bcomm = new BCommon(); if (bcomm.IsDBConn(strconn, strsql)) { DataTable dt = bcomm.GetMasterList("COMPANY", "", "", "").Tables[0]; cboCompany.DisplayMember = "NAME_SHORT"; cboCompany.ValueMember = "CODE"; cboCompany.DataSource = dt; txtLoginUserCode.Focus(); } else { MessageBox.Show("数据库连接失败!", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information); panelDBConfig.Visible = true; } } catch (Exception ex) { MessageBox.Show(ex.ToString(), this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information); Logger.Error("数据库连接失败!", ex); } }
protected void lnkscdule_Click(object sender, EventArgs e) { BECommon objBECommon = new BECommon(); BCommon objBCommon = new BCommon(); objBECommon.IntTransID = Convert.ToInt64(AppSecurity.Decrypt(Session[BaseClass.EnumPageSessions.TransID].ToString())); objBECommon.IntUserID = Convert.ToInt32(Session[BaseClass.EnumPageSessions.USERID].ToString()); objBCommon.BReenableschedulestatus(objBECommon); gvexamdetails.Rebind(); }