protected void BindTimeZone() { try { BUser objBUser = new BUser(); BEUser objBEUser = new BEUser(); objBEUser.IntUserID = Convert.ToInt32(Session[EnumPageSessions.USERID]); objBUser.BGetTimeZone(objBEUser); if (objBEUser.DsResult.Tables[0].Rows.Count > 0) { ddlTimeZone.Items.Clear(); ddlTimeZone.DataValueField = "id"; ddlTimeZone.DataTextField = "TimeZone"; ddlTimeZone.DataSource = objBEUser.DsResult.Tables[0]; ddlTimeZone.DataBind(); } if (objBEUser.DsResult.Tables[1].Rows.Count > 0) { if (objBEUser.DsResult.Tables[1].Rows[0]["TimeZone2"].ToString() != "0") { lblTimeZone.Text = CommonFunctions.CheckNullValue(objBEUser.DsResult.Tables[1].Rows[0]["TimeZone2"].ToString()); } else { lblTimeZone.Text = "Please select time zone"; } ddlTimeZone.SelectedValue = objBEUser.DsResult.Tables[1].Rows[0]["TimeZone1"].ToString().Trim(); } } catch (Exception) { // ErrorLog.WriteError(Ex); } }
public void DForgotPassword(BEUser objBEUser) { try { SqlParameter[] objSqlParam = new SqlParameter[5]; objSqlParam[0] = new SqlParameter("@V_EmailID", SqlDbType.VarChar, 50); objSqlParam[0].Value = objBEUser.StrEmailID; objSqlParam[1] = new SqlParameter("@V_NewPassword", SqlDbType.VarChar, 50); objSqlParam[1].Value = objBEUser.StrRandomPassword; objSqlParam[2] = new SqlParameter("@B_Flag", SqlDbType.Int); objSqlParam[2].Direction = ParameterDirection.Output; objSqlParam[3] = new SqlParameter("@I_UserID", SqlDbType.Int); objSqlParam[3].Direction = ParameterDirection.Output; objSqlParam[4] = new SqlParameter("@V_EmailAddress", SqlDbType.VarChar, 100); objSqlParam[4].Direction = ParameterDirection.Output; SQLHelper.ExecuteNonQuery(DConConfig.ConnectionString, CommandType.StoredProcedure, StoredProcedures.USP_USER_ForgotPassword, objSqlParam); objBEUser.IntResult = Convert.ToInt32(objSqlParam[2].Value); objBEUser.IntUserID = Convert.ToInt32(objSqlParam[3].Value); objBEUser.StrEmailID = objSqlParam[4].Value.ToString(); } catch (Exception ex) { throw ex; } }
public void DSSO_ADDUSER(BEUser objBEUser, string LMSID) { try { SqlParameter[] objSqlParam = new SqlParameter[12]; objSqlParam[0] = new SqlParameter("@V_UserId", SqlDbType.VarChar, 250); objSqlParam[0].Value = objBEUser.StrUserId; objSqlParam[1] = new SqlParameter("@V_FirstName", SqlDbType.VarChar, 250); objSqlParam[1].Value = objBEUser.StrFirstName; objSqlParam[2] = new SqlParameter("@V_LastName", SqlDbType.VarChar, 250); objSqlParam[2].Value = objBEUser.StrLastName; objSqlParam[3] = new SqlParameter("@V_FullName", SqlDbType.VarChar); objSqlParam[3].Value = objBEUser.strStudentName; objSqlParam[4] = new SqlParameter("@V_EmailAddress", SqlDbType.VarChar, 500); objSqlParam[4].Value = objBEUser.StrEmail; objSqlParam[5] = new SqlParameter("@V_CourseID", SqlDbType.VarChar, 8000); objSqlParam[5].Value = objBEUser.strCourseId; objSqlParam[6] = new SqlParameter("@V_CourseName", SqlDbType.VarChar, 8000); objSqlParam[6].Value = objBEUser.strCourseName; objSqlParam[7] = new SqlParameter("@V_user_id", SqlDbType.VarChar, 8000); objSqlParam[7].Value = objBEUser.strUser_Id; objSqlParam[8] = new SqlParameter("@V_Role", SqlDbType.VarChar, 8000); objSqlParam[8].Value = objBEUser.strRole; objSqlParam[9] = new SqlParameter("@V_LMSID", SqlDbType.VarChar, 250); objSqlParam[9].Value = LMSID; objSqlParam[10] = new SqlParameter("@TokenExists", SqlDbType.Bit); objSqlParam[10].Direction = ParameterDirection.Output; SQLHelper.ExecuteNonQuery(DConConfig.ConnectionString, CommandType.StoredProcedure, "USP_SSO_ADDUSER", objSqlParam); objBEUser.IntResult = Convert.ToInt32(objSqlParam[10].Value); } 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.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"); } }
/*Update*/ public string UpdPassword(BEUser objBE) { string respuesta = string.Empty; try { using (DbCommand dbCmd = dbSQL.GetStoredProcCommand("SP_MANT_PASSWORD_UPD")) { dbSQL.AddInParameter(dbCmd, "@userName", DbType.String, objBE.UserName); dbSQL.AddInParameter(dbCmd, "@newPassword", DbType.String, objBE.UserPassword); using (IDataReader dataReader = dbSQL.ExecuteReader(dbCmd)) { int index1 = dataReader.GetOrdinal("respuesta"); object[] values = new object[dataReader.FieldCount]; while (dataReader.Read()) { dataReader.GetValues(values); respuesta = values[index1] == DBNull.Value ? string.Empty : values[index1].ToString(); } } return(respuesta.Substring(0, 1)); } } catch (Exception ex) { ExceptionManager.SaveError("Ocurrio un error en el logo", string.Empty, string.Empty, ex, "validateLoginUser", true, false); return("0"); } finally { } }
protected void btnSaveTimeZone_Click(object sender, EventArgs e) { BUser objBUser = new BUser(); BEUser objBEUser = new BEUser(); objBEUser.IntUserID = Convert.ToInt32(Session[EnumPageSessions.USERID]); if (ddlTimeZone.SelectedIndex != -1) { objBEUser.IntTimeZoneID = Convert.ToInt32(ddlTimeZone.SelectedItem.Value); Session["TimeZoneID"] = Convert.ToInt32(ddlTimeZone.SelectedItem.Value); Session["TimeZone"] = ddlTimeZone.SelectedItem.Text.ToString(); } else { objBEUser.IntTimeZoneID = 0; } objBUser.BCommonUpdateTimeZone(objBEUser); //trTimeZone.Visible = false; if (objBEUser.IntResult == 1) { RoutetoHome(); } else { ScriptManager.RegisterStartupScript(this, this.GetType(), "ShowSuccess", "alert('Time zone Updation falied.Please try again.')", true); } // tblMsg.Visible = true; //lblMsg.Text = "<img src='../Images/yes.png'align='middle'/> <font color='#00C000'>" + "Time zone updated successfully." + "</font>"; }
public string IHospedajeImportar(string pathHoteles, BEUser user) { ImportarArchivosBL BL = new ImportarArchivosBL(); string delimitador = "|"; return(BL.HospedajeImportBL(pathHoteles, delimitador, user)); }
public string ITipo_CambioImportar(string pathHoteles, BEUser userLocal) { ImportarArchivosBL BL = new ImportarArchivosBL(); string delimitador = "|"; return(BL.Tipo_CambioImportBL(pathHoteles, delimitador, userLocal)); }
public void Carga_de_Grilla() { try { BEUser BE = new BEUser(); BE = (BEUser)Session["LoginUser"]; List <BETipo_Cambio> lstTipo_Cambio = new List <BETipo_Cambio>(); ITipo_Cambio IService_Tipo_Cambio = new ITipo_Cambio(); List <BETipo_Cambio> lstBE = new List <BETipo_Cambio>(); lstBE = IService_Tipo_Cambio.IGetTipo_Cambio(int.Parse(this.ddlPeriodos.SelectedValue)); gvHotels.DataSource = lstBE; gvHotels.DataBind(); } catch (Exception ex) { gvHotels.DataSource = null; gvHotels.DataBind(); } finally { } }
public BEUser ValidateUser(string username, string password) { BEUser find = Usuarios.Where(a => a.Username.ToUpper().Equals(username.ToUpper()) && a.Password.Equals(password)). FirstOrDefault(); return(find); }
/// <summary> /// Validate Portal User /// </summary> /// <param name="objBEUser"></param> public void DValidatePortalUser(BEUser objBEUser) { try { SqlParameter[] objSqlParam = new SqlParameter[16]; objSqlParam[0] = new SqlParameter("@V_UserName", SqlDbType.VarChar, 50); objSqlParam[0].Value = objBEUser.StrUserName; objSqlParam[1] = new SqlParameter("@V_Role", SqlDbType.VarChar, 50); objSqlParam[1].Value = objBEUser.strRole; objSqlParam[2] = new SqlParameter("@I_RoleId", SqlDbType.Int); objSqlParam[2].Direction = ParameterDirection.Output; objSqlParam[3] = new SqlParameter("@I_UserID", SqlDbType.Int); objSqlParam[3].Direction = ParameterDirection.Output; objSqlParam[4] = new SqlParameter("@B_Flag", SqlDbType.Int); objSqlParam[4].Direction = ParameterDirection.Output; objSqlParam[5] = new SqlParameter("@V_Name", SqlDbType.VarChar, 500); objSqlParam[5].Direction = ParameterDirection.Output; objSqlParam[6] = new SqlParameter("@B_pwdReset", SqlDbType.Bit); objSqlParam[6].Direction = ParameterDirection.Output; objSqlParam[7] = new SqlParameter("@V_UName", SqlDbType.VarChar, 50); objSqlParam[7].Direction = ParameterDirection.Output; objSqlParam[8] = new SqlParameter("@TimeZoneID", SqlDbType.Int); objSqlParam[8].Direction = ParameterDirection.Output; objSqlParam[9] = new SqlParameter("@TimeZoneName", SqlDbType.VarChar, 500); objSqlParam[9].Direction = ParameterDirection.Output; objSqlParam[10] = new SqlParameter("@B_LoginFlag", SqlDbType.Int); objSqlParam[10].Direction = ParameterDirection.Output; objSqlParam[11] = new SqlParameter("@PaidBy_ExamFee", SqlDbType.Int); objSqlParam[11].Direction = ParameterDirection.Output; objSqlParam[12] = new SqlParameter("@PaidBy_OndemandFee", SqlDbType.Int); objSqlParam[12].Direction = ParameterDirection.Output; objSqlParam[13] = new SqlParameter("@I_DualRole", SqlDbType.Int); objSqlParam[13].Direction = ParameterDirection.Output; objSqlParam[14] = new SqlParameter("@B_IsExistingRole", SqlDbType.Int); objSqlParam[14].Direction = ParameterDirection.Output; objBEUser.DsResult = SQLHelper.ExecuteDataset(DConConfig.ConnectionString, CommandType.StoredProcedure, StoredProcedures.USP_PortalSSO_ValidateUser, objSqlParam); objBEUser.IntResult = int.Parse(objSqlParam[4].Value.ToString()); if (objBEUser.IntResult != 0) { objBEUser.IntRoleID = Convert.ToInt32(objSqlParam[2].Value.ToString()); objBEUser.IntUserID = Convert.ToInt32(objSqlParam[3].Value.ToString()); objBEUser.StrUserAliasName = objSqlParam[5].Value.ToString(); objBEUser.StrPasswordReset = objSqlParam[6].Value.ToString(); objBEUser.StrUserName = objSqlParam[7].Value.ToString(); objBEUser.IntTimeZoneID = Convert.ToInt32(objSqlParam[8].Value.ToString()); objBEUser.StringTimeZone = objSqlParam[9].Value.ToString(); objBEUser.loginflag = Convert.ToBoolean(objSqlParam[10].Value); objBEUser.PaidBy_ExamFee = objSqlParam[11].Value.ToString(); objBEUser.PaidBy_OndemandFee = objSqlParam[12].Value.ToString(); objBEUser.intDualRole = Convert.ToInt32(objSqlParam[13].Value.ToString()); objBEUser.IsExistingRoleUser = Convert.ToInt32(objSqlParam[14].Value.ToString()); } } catch (Exception ex) { throw ex; } }
public void DLMSLogin(BEUser objBEUser) { SqlParameter[] objSqlParam = new SqlParameter[1]; objSqlParam[0] = new SqlParameter("@V_UserName", SqlDbType.VarChar, 100); objSqlParam[0].Value = objBEUser.StrUserName; objBEUser.DsResult = SQLHelper.ExecuteDataset(DConConfig.ConnectionString, CommandType.StoredProcedure, StoredProcedures.USP_LMSLogin, objSqlParam); }
protected void btnSubmit_Click(object sender, EventArgs e) { if (Page.IsValid) { BEUser objBEUser = new BEUser(); BUser objBUser = new BUser(); objBEUser.strOldPassword = txtCurrentPassword.Text; objBEUser.strNewPassword = txtNewPassword.Text; objBEUser.strConfirmNewPassword = txtConfirmNewPassword.Text; objBEUser.StrUserId = Session[BaseClass.EnumPageSessions.USERID].ToString(); objBEUser.IntUserID = Convert.ToInt32(Session[BaseClass.EnumPageSessions.USERID]); objBEUser.StrUserName = Session["EmailID"].ToString(); objBUser.BChangePassword(objBEUser); if (objBEUser.IntResult == 0) { //ScriptManager.RegisterStartupScript(this, this.GetType(), "ShowSuccess", "alert('Updated Successfully')", true); //lblSuccess.Text = "Updated Successfully"; lblSuccess.Text = Resources.ResMessages.MyProfile_PasswordUpdateSuccess; try { BEMail objBEMail = new BEMail(); BMail objBMail = new BMail(); objBEMail.IntUserID = objBEUser.IntUserID; objBEMail.IntTransID = 0; objBEMail.StrTemplateName = BaseClass.EnumEmails.ChangePassword.ToString(); objBMail.BSendEmail(objBEMail); // new BCommon().BSendEmail(objBEUser.IntUserID.ToString(), BaseClass.EnumEmails.ChangePassword.ToString()); // EmailMsg obj = new EmailMsg(); //obj.ChangePassword(objBEUser.IntUserID, objBEUser.StrUserName, objBEUser.strNewPassword); // obj = null; } catch (Exception ex) { throw ex; } } if (objBEUser.IntResult == 1) { // ScriptManager.RegisterStartupScript(this, this.GetType(), "ShowSuccess", "alert('Please enter valid Current Password')", true); //lblSuccess.Text = "Please enter valid Current Password"; lblSuccess.Text = Resources.ResMessages.MyProfile_ValidCurrentPassword; } } }
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); } }
protected void BindDemographicDetails() { BEUser objBEUser = new BEUser(); BUser objBUser = new BUser(); objBEUser.IntUserID = Convert.ToInt32(Session[EnumPageSessions.USERID]); objBUser.BGetProfileDetails(objBEUser); if (objBEUser.DtResult.Rows.Count > 0) { bool isExamikeyUser = false; //Examikey isExamikeyUser = Convert.ToBoolean(objBEUser.DtResult.Rows[0]["IsExamiKeyUser"].ToString()); if (isExamikeyUser) { trExamikey.Visible = true; ImgKeyValidation.Visible = true; lblKeyValidation.Visible = true; //KEY STROKE lblKeyFirstNamevalue.Text = objBEUser.DtResult.Rows[0]["FName"].ToString(); lblKeyFirstandLastNameValue.Text = objBEUser.DtResult.Rows[0]["LFName"].ToString(); } else { trExamikey.Visible = false; ImgKeyValidation.Visible = false; lblKeyValidation.Visible = false; } // lblFirstName.Text = objBEUser.DtResult.Rows[0]["FirstName"].ToString(); txtFirstName.Text = objBEUser.DtResult.Rows[0]["FirstName"].ToString(); lblLastName.Text = objBEUser.DtResult.Rows[0]["LastName"].ToString(); txtLastName.Text = objBEUser.DtResult.Rows[0]["LastName"].ToString(); lblEmail.Text = objBEUser.DtResult.Rows[0]["EmailAddress"].ToString(); txtEmail.Text = objBEUser.DtResult.Rows[0]["EmailAddress"].ToString(); if (objBEUser.DtResult.Rows[0]["PhoneNumber"] != DBNull.Value && objBEUser.DtResult.Rows[0]["PhoneNumber"].ToString().Trim() != string.Empty) { //lblphone.Text = objBEUser.DtResult.Rows[0]["PhoneNumber"].ToString(); lblphone.Text = objBEUser.DtResult.Rows[0]["CountryPhoneNumber"].ToString(); txtPhoneNumber.Text = objBEUser.DtResult.Rows[0]["PhoneNumber"].ToString(); } else { lblphone.Text = "N/A"; txtPhoneNumber.Text = ""; } } }
public void BSSO_ADDUSER(BEUser objBEUser, string LMS) { try { new DUser().DSSO_ADDUSER(objBEUser, LMS); } catch (Exception ex) { throw ex; } }
public void BChangePassword(BEUser objBEUser) { try { new DUser().DChangePassword(objBEUser); } catch (Exception ex) { throw ex; } }
public void BGenderList(BEUser objBEUser) { try { new DUser().DGenderList(objBEUser); } catch (Exception Ex) { throw Ex; } }
public void BForgotPassword(BEUser objBEUser) { try { new DUser().DForgotPassword(objBEUser); } catch (Exception ex) { throw ex; } }
public void BUpdateTimeZone(BEUser objBEUser) { try { new DUser().DUpdateTimeZone(objBEUser); } catch (Exception Ex) { throw Ex; } }
/// <summary> /// Validate Portal User /// </summary> /// <param name="objBEUser"></param> public void BValidatePortalUser(BEUser objBEUser) { try { new DUser().DValidatePortalUser(objBEUser); } catch (Exception ex) { throw ex; } }
public static string UpdPassword(BEUser objBE) { BEUser BE = new BEUser(); BE.UserName = objBE.UserName.Trim(); BE.UserPassword = objBE.UserPassword.Trim(); BE.UserPasswordRep = objBE.UserPasswordRep.Trim(); IUsers IService = new IUsers(); return(IService.IUpdPassword(objBE)); }
public void BGetProfileDetails(BEUser objBEUser) { try { new DUser().DGetProfileDetails(objBEUser); } catch (Exception Ex) { throw Ex; } }
/// <summary> /// Validate User /// </summary> /// <param name="objBEUser"></param> public void BFindUser(BEUser objBEUser) { try { new DUser().DFindUser(objBEUser); } catch (Exception ex) { throw ex; } }
protected void btnGrabar_Click(object sender, EventArgs e) { BEUser BE = new BEUser(); BE.UserName = txtUsuario.Text.Trim(); BE.UserPassword = txtPassword.Text.Trim(); IUsers IService = new IUsers(); IService.IUpdPassword(BE); ClientScript.RegisterStartupScript(typeof(Page), "succed", "alert('Se cambio el password correctamente');", true); }
public void BUpdateLoginFlag(BEUser objBEUser) { try { new DUser().DUpdateLoginFlag(objBEUser); } catch (Exception Ex) { throw Ex; } }
public void BLMSLogin(BEUser objBEUser) { try { new DUser().DLMSLogin(objBEUser); } catch (Exception ex) { throw ex; } }
public void BCommonUpdateTimeZone(BEUser objBEUser) { try { new DUser().DCommonUpdateTimeZone(objBEUser); } catch (Exception ex) { throw ex; } }
protected void loadDropPeriodos(Boolean loadLocal = false) { int index = ddlPeriodos.SelectedIndex; IPeriodos IService = new IPeriodos(); //Dim obj As UserStore = DirectCast(Session.Item("SessionUser"), UserStore) BEUser BE = new BEUser(); BE = (BEUser)Session["LoginUser"]; List <BEPeriodoEmpresa> lstPeriodoEmpresa = new List <BEPeriodoEmpresa>(); List <BEPeriodoEmpresa> AlllistaPeriodos = IService.IGetPeriodos(BE); cCodLocal = AlllistaPeriodos[0].codLocal; if (loadLocal) { loadDropLocal(cCodLocal); } cCodLocal = ddlLocales.SelectedValue; if (!string.IsNullOrEmpty(cCodLocal)) { lstPeriodoEmpresa = AlllistaPeriodos.FindAll( delegate(BEPeriodoEmpresa PE) { return(PE.codLocal == cCodLocal); }); } else { foreach (BEPeriodoEmpresa objPerEmp in AlllistaPeriodos) { List <BEPeriodoEmpresa> LstPerEmpToadd = lstPeriodoEmpresa.FindAll( delegate(BEPeriodoEmpresa PE) { return(PE.descPeriodo == objPerEmp.descPeriodo); }); if (LstPerEmpToadd == null || LstPerEmpToadd.Count == 0) { lstPeriodoEmpresa.Add(objPerEmp); } } } ddlPeriodos.DataSource = lstPeriodoEmpresa; ddlPeriodos.DataValueField = "codPeriodoEmpresa"; ddlPeriodos.DataTextField = "descPeriodo"; ddlPeriodos.DataBind(); if (index < lstPeriodoEmpresa.Count) { ddlPeriodos.SelectedIndex = index; } }
public void DGenderList(BEUser objBEUser) { try { objBEUser.DtResult = SQLHelper.ExecuteDataset(DConConfig.ConnectionString, CommandType.StoredProcedure, StoredProcedures.USP_STUDENT_GetGenderList).Tables[0]; } catch (Exception Ex) { throw Ex; } }