public void Invoke()
        {
            EndUserLoginSelectData endUserLogin = new EndUserLoginSelectData();
            endUserLogin.EndUser = this.EndUser;
            this.ResultSet = endUserLogin.Get();

            if (ResultSet.Tables[0].Rows.Count != 0)
            {
                this.IsAuthenticated = true;

                this.EndUser.EndUserId = int.Parse(ResultSet.Tables[0].Rows[0]["EndUserId"].ToString());
                this.EndUser.EndUserTypeId = int.Parse(ResultSet.Tables[0].Rows[0]["EndUserTypeId"].ToString());
                this.EndUser.FirstName = ResultSet.Tables[0].Rows[0]["FirstName"].ToString();
                this.EndUser.LastName = ResultSet.Tables[0].Rows[0]["LastName"].ToString();
                this.EndUser.AddressId = int.Parse(ResultSet.Tables[0].Rows[0]["AddressId"].ToString());
                this.EndUser.ContactInformationId = int.Parse(ResultSet.Tables[0].Rows[0]["ContactInformationId"].ToString());
                this.EndUser.Password = ResultSet.Tables[0].Rows[0]["Password"].ToString();

                //obtain the Address information
                ProcessGetContactInformation getContactInformation = new ProcessGetContactInformation();
                getContactInformation.ContactInformation.ContactInformationId = EndUser.ContactInformationId;

                getContactInformation.Invoke();

                EndUser.ContactInformation = getContactInformation.ContactInformation;
            }
            else
            {
                EndUser = null;
                IsAuthenticated = false;
            }
        }
Пример #2
0
        public bool Invoke()
        {
            bool complete = false;

            try
            {
                EndUserLoginSelectData enduserlogin = new EndUserLoginSelectData();
                enduserlogin.EndUser = this.EndUser;
                ResultSet            = enduserlogin.Get();

                if (ResultSet.Tables[0].Rows.Count != 0)
                {
                    EndUser.EndUserID             = int.Parse(ResultSet.Tables[0].Rows[0]["EndUserID"].ToString());
                    EndUser.EndUserTypeID         = int.Parse(ResultSet.Tables[0].Rows[0]["EndUserTypeID"].ToString());
                    EndUser.FirstName             = ResultSet.Tables[0].Rows[0]["Firstname"].ToString();
                    EndUser.LastName              = ResultSet.Tables[0].Rows[0]["LastName"].ToString();
                    EndUser.AddressID             = int.Parse(ResultSet.Tables[0].Rows[0]["AddressID"].ToString());
                    EndUser.ContactInformtationID = int.Parse(ResultSet.Tables[0].Rows[0]["ContactInformationID"].ToString());
                    EndUser.Password              = ResultSet.Tables[0].Rows[0]["Password"].ToString();

                    // Obtain the Address information.
                    ProcessGetAddress getaddress = new ProcessGetAddress();
                    getaddress.Address.AddressID = EndUser.AddressID;

                    if (getaddress.Invoke())
                    {
                        EndUser.Address = getaddress.Address;
                    }

                    // Obtain the ContactInformation information.
                    ProcessGetContactInformation getcontactinfo = new ProcessGetContactInformation();
                    getcontactinfo.ContactInformation.ContactInformationID = EndUser.ContactInformtationID;

                    if (getcontactinfo.Invoke())
                    {
                        EndUser.ContactInformation = getcontactinfo.ContactInformation;
                    }

                    complete = true;
                }
                else
                {
                    complete = false;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(complete);
        }
        public void Invoke()
        {
            EndUserLoginSelectData enduserlogin = new EndUserLoginSelectData();

            enduserlogin.EndUser = this.EndUser;
            ResultSet            = enduserlogin.Get();

            if (ResultSet.Tables[0].Rows.Count != 0)
            {
                IsAuthenticated = true;

                EndUser.EndUserID            = int.Parse(ResultSet.Tables[0].Rows[0]["EndUserID"].ToString());
                EndUser.EndUserTypeID        = int.Parse(ResultSet.Tables[0].Rows[0]["EndUserTypeID"].ToString());
                EndUser.FirstName            = ResultSet.Tables[0].Rows[0]["Firstname"].ToString();
                EndUser.LastName             = ResultSet.Tables[0].Rows[0]["LastName"].ToString();
                EndUser.AddressID            = int.Parse(ResultSet.Tables[0].Rows[0]["AddressID"].ToString());
                EndUser.ContactInformationID = int.Parse(ResultSet.Tables[0].Rows[0]["ContactInformationID"].ToString());
                EndUser.Password             = ResultSet.Tables[0].Rows[0]["Password"].ToString();

                // Obtain the Address information.
                ProcessGetAddress getaddress = new ProcessGetAddress();
                getaddress.Address.AddressID = EndUser.AddressID;

                getaddress.Invoke();
                EndUser.Address = getaddress.Address;

                // Obtain the ContactInformation information.
                ProcessGetContactInformation getcontactinfo = new ProcessGetContactInformation();
                getcontactinfo.ContactInformation.ContactInformationID = EndUser.ContactInformationID;

                getcontactinfo.Invoke();

                EndUser.ContactInformation = getcontactinfo.ContactInformation;
            }
            else
            {
                IsAuthenticated = false;
                EndUser         = null;
            }
        }