private void getUserPasswordresetvalidity(string UserId) { try { string[] id = UserId.Split('#'); UserBLL usrbll = new UserBLL(); hdnfldUserID.Value = usrbll.UserId = id[0]; DataTable dt = usrbll.getUserPasswordsetValidity(); if (dt.Rows.Count > 0) { userNameLabel.Text = dt.Rows[0][0].ToString(); if (dt.Rows[0]["IsBlocked"].ToString() == "No") { if (dt.Rows[0]["Isvarify"].ToString() == "Yes" && dt.Rows[0]["FirstTime"].ToString() != "0") { string message = " <span class='actionTopic'>" + "Your Email id Succesfully Varified. You may LOG IN in now. Click ok to log in." + "</span>."; MyAlertBox( "var callbackOk = function () { window.location = \"/login.aspx\"; }; SuccessAlert(\"" + "Process Succeed" + "\", \"" + message + "\", callbackOk);"); } else if (dt.Rows[0]["Isvarify"].ToString() == "Yes" && !string.IsNullOrEmpty(dt.Rows[0]["VarificationCode"].ToString()) && dt.Rows[0]["FirstTime"].ToString() != "1") { varificationSection.Visible = true; string message = " <span class='actionTopic'>" + "Please Insert your varification code and Change Your Password!!" + "</span>."; MyAlertBox("var callbackOk = function () { window.location = \"\"; }; SuccessAlert(\"" + "Process Succeed" + "\", \"" + message + "\", \"\");"); hdnfldVarifiCode.Value = dataEncryptbll.EncryptRijndael(dt.Rows[0]["VarificationCode"].ToString(), dataEncryptbll.addforvarifycore); } else { string message = " <span class='actionTopic'>" + "Your Request Time out or this link already used. Please Try again leter or Contact with System Admin" + "</span>."; MyAlertBox( "var callbackOk = function () { window.location = \"/login.aspx\"; }; WarningAlert(\"" + "Warning!!" + "\", \"" + message + "\", callbackOk);"); // MyAlertBox("var callbackOk = function () { window.location = \"/login\"; }; ErrorAlert(\"" + "Warning" + "\", \"" + message + "\", callbackOk);"); } } else { string message = " <span class='actionTopic'>" + "This account is blocked. Please Try again leter or Contact with System Admin" + "</span>."; MyAlertBox( "var callbackOk = function () { window.location = \"/login.aspx\"; }; WarningAlert(\"" + "Warning!!" + "\", \"" + message + "\", callbackOk);"); } } else { string message = " <span class='actionTopic'>" + "Your Request Time out Please Try again leter or Contact with System Admin" + "</span>."; MyAlertBox("var callbackOk = function () { window.location = \"/login.aspx\"; }; WarningAlert(\"" + "Warning!!" + "\", \"" + message + "\", callbackOk);"); // MyAlertBox("var callbackOk = function () { window.location = \"/login\"; }; ErrorAlert(\"" + "Warning" + "\", \"" + message + "\", callbackOk);"); } } catch (Exception ex) { string message = ex.Message; if (ex.InnerException != null) { message += " --> " + ex.InnerException.Message; } MyAlertBox("ErrorAlert(\"" + ex.GetType() + "\", \"" + message + "\", \"\");"); } }