示例#1
0
    public List <CarsInfo.UserLoginInfo> PerformLoginMobile(string Username, string Password, string AuthenticationID, string CustomerID)
    {
        MobileBL objUser = new MobileBL();
        var      obj     = new List <CarsInfo.UserLoginInfo>();

        try
        {
            if (CustomerID.Trim() != "")
            {
                DataSet dsSaveCustInfo = objUser.SaveMobileCustomerInfo("PerformLoginMobile", CustomerID, AuthenticationID, Username);
            }

            if (AuthenticationID == ConfigurationManager.AppSettings["AppleID"].ToString())
            {
                obj = (List <CarsInfo.UserLoginInfo>)objUser.PerformLoginMobile(Username, Password);
                if (obj.Count > 0)
                {
                    int     UserID = Convert.ToInt32(obj[0].UID.ToString());
                    DataSet ds     = objUser.MobileSaveUserLog(UserID);
                    if (ds.Tables.Count > 0)
                    {
                        if (ds.Tables[0].Rows.Count > 0)
                        {
                            obj[0].SessionID = ds.Tables[0].Rows[0]["M_UCESessionID"].ToString();
                        }
                    }
                }
            }
            if (obj.Count <= 0)
            {
                CarsInfo.UserLoginInfo objinfo = new UserLoginInfo();
                objinfo.AASuccess = "Failure";
                obj.Add(objinfo);
            }
        }
        catch (Exception ex)
        {
        }

        return(obj);
    }