Ejemplo n.º 1
0
        public void Delete_Died_VPS_Adress()
        {
            var context  = new VPSContext();
            var vps_list = context.VPS_Informations.Where(c => (int)c.VPS_Status == 0);

            foreach (var vps in vps_list)
            {
                context.VPS_Informations.Remove(vps);
            }
            context.SaveChanges();
        }
Ejemplo n.º 2
0
        public void Change_Pass_Words_All(string New_Passwords)
        {
            var context  = new VPSContext();
            var vps_list = context.VPS_Informations.ToList();

            foreach (var vps in vps_list)
            {
                vps.Pass_Word = New_Passwords;
            }
            context.SaveChanges();
        }
Ejemplo n.º 3
0
        public void Modidy_Data_Via_IP_Adress(string IP_Address)
        {
            var context  = new VPSContext();
            var vps_list = context.VPS_Informations.Where(c => c.IP_Address == IP_Address);

            if (vps_list.Count() == 0)
            {
                Console.WriteLine("There is no IP_Address Matched");
            }
            else
            {
                foreach (var vps in vps_list)
                {
                    vps.User_Name = "newname";
                }
                context.SaveChanges();
                Console.WriteLine("VPS Information after Motifying");
                foreach (var vps in vps_list)
                {
                    Show_Information(vps);
                }
            }
        }