public async void getSTatus()
        {
            _objDBUI = await _objAuth.checkAuthenticity(GeneralUtilities.getUsername());

            HRDsqData.Library.WriteErrorLog("status get: " + _objDBUI.AccountStatus);
            accountStatus = _objDBUI.AccountStatus.ToLower();
        }
        public async Task <DBUserInfo> checkAuthenticity(string PCUsername)
        {
            try
            {
                Library.WriteErrorLog(PCUsername);
                _objDUI = new DBUserInfo();

                username = PCUsername;

                strHDInfo = clsHDInfo.MacAddress();// getUniqueID("");
                Library.WriteErrorLog("MACAddress: " + strHDInfo);
                HRDsqApi.DataAccess      ServiceObj = new HRDsqApi.DataAccess();
                HRDsqApi.DataAccess.User objuserinfo
                    = new HRDsqApi.DataAccess.User();
                List <HRDsqApi.DataAccess.UserHDDInfo> userhddinfo = new List <HRDsqApi.DataAccess.UserHDDInfo>();
                userhddinfo.Add(new HRDsqApi.DataAccess.UserHDDInfo {
                    HDDNumber = strHDInfo.ToString().Trim(), IsServer = true
                });
                objuserinfo.UserHDDInfo = userhddinfo;
                objuserinfo             = await ServiceObj.GetServerDetail(objuserinfo);

                if (objuserinfo.Message.Trim().ToLower() == "approved")
                {
                    foreach (var item in objuserinfo.UserHDDInfo)
                    {
                        _objDUI.dbUserSub     = item.Subscription;
                        _objDUI.dbCnt         = item.Count;
                        _objDUI.SMSFNo        = objuserinfo.SMSFromNumber;
                        _objDUI.DrPhoneNumber = objuserinfo.PhoneNumber;
                        _objDUI.PracticeName  = objuserinfo.LastName;
                        _objDUI.SMSAuthID     = item.AuthID;
                        _objDUI.SMSAuthToken  = item.AuthToken;
                        _objDUI.ODVersion     = item.ODVersion;
                        _objDUI.dbUserId      = item.ID;
                        IsDebug = item.IsDebugMode;
                        AuID    = item.ID;
                        AuUID   = item.UserId;
                        Library.WriteErrorLog("accountStatus: " + objuserinfo.Message);
                        _objDUI.AccountStatus = objuserinfo.Message;
                    }

                    //---------Practice Id--------------------
                    ClsStaticString.PracticeID = Convert.ToString(AuUID);

                    ClsStaticString.SMSNo = objuserinfo.SMSFromNumber.ToString();

                    Library.WriteErrorLog("Practice id -- " + AuID);


                    //-----------Added by Vandna on 05-Jan-2017--
                    uAuthID      = objuserinfo.uAuthID;
                    uAuthToken   = objuserinfo.uAuthToken;
                    uApiKey      = objuserinfo.uApiKey;
                    ProviderType = objuserinfo.ProviderType;

                    pSMS.sVoipLogin  = objuserinfo.uAuthID;
                    pSMS.sVoipSecret = objuserinfo.uAuthToken;
                    //----End-----
                    _objDUI.IsInsService   = objuserinfo.IsInsService;
                    _objDUI.IsRSApptConf   = objuserinfo.IsRSApptConf;
                    _objDUI.IsRSApptRecall = objuserinfo.IsRSApptRecall;
                    _objDUI.IsRSBirthday   = objuserinfo.IsRSBirthday;
                    _objDUI.isAuthentic    = true;
                    _objDUI.isSMS          = objuserinfo.IsSMS;
                    // Added by ashok patel Date 04 Oct 2016
                    _objDUI.dbUserId = objuserinfo.UserId;
                    // Added by vandna chaurasia Date 18 March 2017
                    _objDUI.SecNo = objuserinfo.Line2PhoneNumber;
                    //Library.WriteErrorLog("User " + username.ToString().Trim() + " is approved user.");
                }
                else
                {
                    _objDUI.isAuthentic    = false;
                    _objDUI.isSMS          = false;
                    _objDUI.IsInsService   = false;
                    _objDUI.IsRSApptConf   = false;
                    _objDUI.IsRSApptRecall = false;
                    _objDUI.IsRSBirthday   = false;
                    _objDUI.AccountStatus  = objuserinfo.Message;
                    Library.WriteErrorLog("User " + username.ToString().Trim() + " is not approved user." + Environment.NewLine + objuserinfo.Message.Trim().ToLower());
                }

                return(_objDUI);
            }
            catch (Exception pcex)
            {
                Library.LogError(pcex);
                return(null);
            }
            finally
            {
                if (_objDUI != null)
                {
                    _objDUI = null;
                }
            }
        }