private bool resetPassword(LogonInfo logonInfo) { ASNA.Monarch.DynamicDisplayFile wfSignon = new ASNA.Monarch.DynamicDisplayFile("~/Monarch/SignOn.aspx"); char[] myIndicators = new string('0', 100).ToCharArray(); string currentPass = ""; string newPass = ""; string message = ""; wfSignon.Open(); do { wfSignon.Write("RNEWPASS", myIndicators, populatePassBuffer, message); wfSignon.Read(); if (wfSignon.FeedbackAID == (byte)ASNA.Monarch.WebDspF.AidKeyIBM.F3) { return(false); } System.Data.DataRow row = wfSignon.DataSet.Tables["RNEWPASS"].Rows[0]; currentPass = row["PASSWORD"].ToString().Trim(); newPass = row["NEWPASS"].ToString().Trim(); if (newPass == row["CONFIRM"].ToString().Trim()) { break; } message = "Confirmation Password is not identical to New Password"; } while (true); wfSignon.Close(); logonInfo.Message = setNewPassword(logonInfo.User, currentPass, newPass); logonInfo.Password = newPass; return(true); }
private bool promptLogon(LogonInfo logonInfo) { ASNA.Monarch.DynamicDisplayFile wfSignon = new ASNA.Monarch.DynamicDisplayFile("~/Monarch/SignOn.aspx"); wfSignon.Open(); char[] myIndicators = new char[100]; for (int i = 1; i < 100; i++) { myIndicators[i] = '1'; } if (logonInfo.PromptServer) { myIndicators[30] = '0'; } logonInfo.Password = ""; wfSignon.Write("RSIGNON", myIndicators, populateSignonBuffer, logonInfo); wfSignon.Read(); if (wfSignon.FeedbackAID == (byte)ASNA.Monarch.WebDspF.AidKeyIBM.F3) { return(false); } System.Data.DataRow row = wfSignon.DataSet.Tables["RSIGNON"].Rows[0]; if (logonInfo.PromptServer) { logonInfo.Server = row["SYSTEM"].ToString().Trim(); logonInfo.Port = (int)decimal.Parse(row["PORT"].ToString()); } logonInfo.User = row["USER"].ToString().Trim(); logonInfo.Password = row["PASSWORD"].ToString().Trim(); logonInfo.Message = ""; wfSignon.Close(); return(true); }
private void promptLogon(LogonInfo logonInfo) { ASNA.Monarch.DynamicDisplayFile wfSignon = new ASNA.Monarch.DynamicDisplayFile("~/Monarch/SignOn.aspx"); wfSignon.Open(); char[] myIndicators = new string('0', 100).ToCharArray(); logonInfo.Password = ""; wfSignon.Write("RSIGNON", myIndicators, populateSignonBuffer, logonInfo); wfSignon.Read(); System.Data.DataRow row = wfSignon.DataSet.Tables["RSIGNON"].Rows[0]; logonInfo.Server = row["SYSTEM"].ToString().Trim(); logonInfo.User = row["USER"].ToString().Trim(); logonInfo.Password = row["PASSWORD"].ToString().Trim(); logonInfo.Port = ( int )decimal.Parse(row["PORT"].ToString()); logonInfo.Program = row["PROGRAM"].ToString().Trim(); logonInfo.Menu = row["MENU"].ToString().Trim(); logonInfo.Library = row["LIBRARY"].ToString().Trim(); logonInfo.Message = ""; wfSignon.Close(); }