Exemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            var db = DBHelper.GetInstance();
            T_EquipmentStatus entity = new T_EquipmentStatus();

            entity.F_EquipmentAlarm  = 0;
            entity.F_EquipmentID     = "0";
            entity.F_EquipmentStatus = 0;
            for (int i = 0; i < 500; i++)
            {
                db.Insertable(entity).ExecuteCommand();
            }
        }
Exemplo n.º 2
0
 private void alter(object i)
 {
     try
     {
         var db = DBHelper.GetInstance();
         int j  = 0;
         while (true)
         {
             j++;
             T_EquipmentStatus entity = new T_EquipmentStatus();
             entity.F_EquipmentAlarm  = 0;
             entity.F_EquipmentID     = "0";
             entity.F_EquipmentStatus = j % 100;
             entity.F_ID = Convert.ToInt32(i);
             db.Updateable(entity).ExecuteCommand();
             Thread.Sleep(1000);
         }
     }
     catch (Exception ex)
     {
         LogHelper.WriteLog("cuowu", ex);
         throw;
     }
 }