Example #1
0
        public void GenerateData()
        {
            User u = new User()
            {
                Username = "******", Password = "******"
            };

            u.Save();

            //generate 100 users
            for (int i = 0; i < 100; i++)
            {
                Client c = new Client()
                {
                    Name = "client " + i, Network = "Orange", Phone = "0745961116"
                };
                c.Save();
            }

            ModemSettings modemSettings = new ModemSettings()
            {
                Port        = "COM1",
                BitPerSec   = 115200,
                DataBits    = 8,
                Parity      = Parity.None,
                StopBits    = StopBits.One,
                FlowControl = "NONE"
            };

            modemSettings.Save();

            var clients = Client.FindAll();

            for (int i = 0; i < 5; i++)
            {
                for (int j = 0; j < 6; j++)
                {
                    var        date = DateTime.Now.AddDays(j);
                    SmsHistory h    = new SmsHistory()
                    {
//                                           Client = clients[i],
                        Date        = date.ToString(),
                        Message     = "Mesajul Nr " + j,
                        Status      = "Send ok",
                        ClientName  = clients[i].Name,
                        ClientPhone = clients[i].Phone
                    };
                    h.Save();
                }
            }
        }
Example #2
0
 public void Save(ModemSettings settings)
 {
     try
     {
         settings.Save();
         PropertyBag["settings"] = settings;
         this.RaiseNotification(res.ResourceManager.GetString("SavingSettings"));
     }
     catch (Exception ex)
     {
         Flash flash = new Flash(ex.Message);
         PropertyBag["settings"] = settings;
         PropertyBag["flash"] = flash;
     }
 }
Example #3
0
 public void Save(ModemSettings settings)
 {
     try
     {
         settings.Save();
         PropertyBag["settings"] = settings;
         this.RaiseNotification(res.ResourceManager.GetString("SavingSettings"));
     }
     catch (Exception ex)
     {
         Flash flash = new Flash(ex.Message);
         PropertyBag["settings"] = settings;
         PropertyBag["flash"]    = flash;
     }
 }
Example #4
0
        public void GenerateData()
        {
            User u=new User(){Username = "******",Password = "******"};
            u.Save();

            //generate 100 users
            for(int i=0;i<100;i++)
            {
                Client c=new Client(){Name = "client "+i,Network = "Orange",Phone = "0745961116"};
                c.Save();
            }

            ModemSettings modemSettings = new ModemSettings()
                                              {
                                                  Port = "COM1",
                                                  BitPerSec = 115200,
                                                  DataBits = 8,
                                                  Parity =Parity.None,
                                                  StopBits =StopBits.One,
                                                  FlowControl = "NONE"
                                              };
            modemSettings.Save();

            var clients = Client.FindAll();
            
            for(int i=0;i<5;i++)
            {
                for(int j=0;j<6;j++)
                {
                    var date = DateTime.Now.AddDays(j);
                    SmsHistory h = new SmsHistory()
                                       {
//                                           Client = clients[i],
                                           Date = date.ToString(),
                                           Message = "Mesajul Nr " + j,
                                           Status = "Send ok",
                                           ClientName = clients[i].Name,
                                           ClientPhone = clients[i].Phone
                                       };
                    h.Save();
                }
            }
        }