示例#1
0
        public MobileOs GetMobileOsType(MobileOs mobileos)
        {
            string fetchMobileOsType = $"SELECT * FROM Mobifix_DB.MOBILE_OS_TYPE WHERE LOWER (MOBILE_OS_TYPE_ID) = '{ mobileos.MobileOsID }'";
            var    dtResult          = MySqlMobileOsHelper.ExecuteQuery(fetchMobileOsType);
            var    mobileostype      = FillMobileOsTypesModel(dtResult);

            return(mobileostype.FirstOrDefault <MobileOs>());
        }
        public IHttpActionResult UpdateMobileOs([FromBody] MobileOs mobileos)
        {
            var mobileosRepo = new MobileOsRepository();
            var result       = mobileosRepo.UpdateMobileOs(mobileos);

            if (result <= 0)
            {
                return(Ok("Error occurred while updating Mobile Os Status"));
            }
            return(Ok("Mobile Os Status updated"));
        }
        public IHttpActionResult GetMobileOsType([FromBody] MobileOs mobileos)
        {
            var moblieosRepo    = new MobileOsRepository();
            var getmobileostype = moblieosRepo.GetMobileOsType(mobileos);

            if (getmobileostype == null)
            {
                return(NotFound());
            }
            return(Ok(getmobileostype));
        }
示例#4
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Channel.Length != 0)
            {
                hash ^= Channel.GetHashCode();
            }
            if (ChannelInfo.Length != 0)
            {
                hash ^= ChannelInfo.GetHashCode();
            }
            if (Account.Length != 0)
            {
                hash ^= Account.GetHashCode();
            }
            if (Pwd.Length != 0)
            {
                hash ^= Pwd.GetHashCode();
            }
            if (MobileOs != 0)
            {
                hash ^= MobileOs.GetHashCode();
            }
            if (ClientVersion.Length != 0)
            {
                hash ^= ClientVersion.GetHashCode();
            }
            if (Language != 0)
            {
                hash ^= Language.GetHashCode();
            }
            if (ServerId.Length != 0)
            {
                hash ^= ServerId.GetHashCode();
            }
            if (Mac.Length != 0)
            {
                hash ^= Mac.GetHashCode();
            }
            if (Idfa.Length != 0)
            {
                hash ^= Idfa.GetHashCode();
            }
            if (Driver.Length != 0)
            {
                hash ^= Driver.GetHashCode();
            }
            if (Ts.Length != 0)
            {
                hash ^= Ts.GetHashCode();
            }
            return(hash);
        }
示例#5
0
        private IList <MobileOs> FillMobileOsTypesModel(DataTable dtMobileOsType)
        {
            var mobileostypesList = new List <MobileOs>();

            if (null != dtMobileOsType && dtMobileOsType.Rows.Count > 0)
            {
                foreach (DataRow row in dtMobileOsType.Rows)
                {
                    var mobileostype = new MobileOs();
                    mobileostype.MobileOsID          = Convert.ToInt32(row["MOBILE_OS_TYPE_ID"]);
                    mobileostype.MobileOsDescription = Convert.ToString(row["MOBILE_OS_DESC"]);
                    mobileostype.MobileOsTypeInd     = Convert.ToInt32(row["MOBILE_OS_TYPE_IND"]);
                    mobileostype.CreatedDate         = Convert.ToDateTime(row["CREATED_DATE"]);
                    mobileostype.CreatedBy           = Convert.ToInt32(row["CREATED_BY"]);
                    mobileostype.LastModifiedDate    = Convert.ToDateTime(row["LASTMODIFIED_DATE"]);
                    mobileostype.LastModifiedBy      = Convert.ToInt32(row["LASTMODIFIED_BY"]);
                    mobileostypesList.Add(mobileostype);
                }
            }
            return(mobileostypesList);
        }
示例#6
0
        //public int InsertMobileDetails(MobileOs mobileos)
        //{
        //    string InsertMobileInfo = $"INSERT INTO Mobifix_DB.USER_TBL(FK_USER_TYPE_ID, LOGIN_ID, LOGIN_PWD, NUM_OF_FAILED_ATTEMPTS, LAST_LOGIN_DT, FK_USER_STATUS_CD, CREATED_DATE, CREATED_BY, LASTMODIFIED_DATE, LASTMODIFIED_BY)" +
        //        $" VALUES({user.UserType}, '{user.LoginId}', '{user.Password}', {user.NoOfAttempts},  NOW(), '{user.UserStatus}', NOW(), {user.CrearedBy},NOW(), {user.LastUpdateBy}";
        //}

        public int UpdateMobileOs(MobileOs mobileos)
        {
            string updateMobileOs = $"UPDATE Mobifix_DB.MOBILE_OS_TYPE SET MOBILE_OS_TYPE_IND  = '{mobileos.MobileOsTypeInd}' WHERE LOWER(MOBILE_OS_TYPE_ID) = '{mobileos.MobileOsID.ToString()}' ";

            return(MySqlMobileOsHelper.ExecuteNonQuery(updateMobileOs));
        }