public void connectOnOBjects(string inquiryType) { OBJECTSONLib.UnioaifCtrl onObjects; onObjects = new OBJECTSONLib.UnioaifCtrl(); onObjects.AccountPath = "WEB.BASE.THIN"; onObjects.HostName = "10.11.11.10"; if (onObjects.Connect()) { var gSubRoutine = onObjects.Subroutine("ACRO.INQ", 6); //ACRO.INQ TAKES LOGON, ACRO, FIRSTNAME, DOB, DATA, ERRORMSG gSubRoutine.setArg(0, "WEB.BASE"); //LOGON gSubRoutine.setArg(1, txtAcronym.Text.ToUpper().Trim()); //ACRO gSubRoutine.setArg(2, txtAcronymFirstName.Text.ToUpper().Trim()); //FIRSTNAME - OPTIONAL - FORMAT IS MM/DD/YYYY gSubRoutine.setArg(3, txtAcronymDOB.Text.Trim()); //DOB - OPTIONAL gSubRoutine.setArg(4, ""); //DATA LEAVE BLANK - THIS IS WHERE THE ATTRIBUTE FOR THE RETURN VALUES gSubRoutine.setArg(5, ""); //ERROR LEAVE BLANK - ERROR MESSAGE WILL BE PASSED BACK HERE gSubRoutine.call(); string strText = gSubRoutine.getArg(4); m_Accounts = new AccountViews(strText); onObjects.Disconnect(); } else { string x = "not connected"; } }
/// <summary> /// Runs the login functionality page /// </summary> /// <returns>integer, user id if successful, 0 if not</returns> public int Run() { AccountViews.LoginPage(); var userName = Console.ReadLine(); var userPassword = Console.ReadLine(); return(CheckLoginStatus(userName, userPassword)); }
protected void grdInquiryByAcronym_PageIndexChanging(object sender, GridViewPageEventArgs e) { //using Linq to skip over x rows of data and take the next y rows (you also have to convert it back to a list //as Linq turns it into a var (sort of unknown but anything goes) object m_Accounts = m_Accounts.Skip(grdInquiry.PageSize * e.NewPageIndex).Take(grdInquiry.PageSize).ToList <AccountView>() as AccountViews; //m_Accounts = m_Accounts.Where(a=>a.AccountNumber.Equals("34344")).ToList<AccountView>() as AccountViews; grdInquiry.PageIndex = e.NewPageIndex; grdInquiry.DataBind(); }
/// <summary> /// Runs the logout functionality page /// </summary> /// <param name="userId"></param> public void Run(int userId) { if (userId != 0) { WebbShopAPI api = new WebbShopAPI(); api.Logout(userId); } AccountViews.LogoutUser(); }
/// <summary> /// Checks if login succeeded /// </summary> /// <param name="userName"></param> /// <param name="userPassword"></param> /// <returns>integer, user id if successful, 0 if not</returns> public int CheckLoginStatus(string userName, string userPassword) { if (userName != "" && userPassword != "") { WebbShopAPI api = new WebbShopAPI(); var user = api.Login(userName, userPassword); if (user != 0) { AccountViews.LoginSuccess(); return(user); } } AccountViews.LoginFailed(); return(0); }