Exemplo n.º 1
0
        // DeletePanel()
        public void DeletePanel(string IdPanel)
        {
            var db = new PocoDynamo(con.GetClient());

            db.RegisterTable <Panels>();

            try
            {
                db.DeleteItem <Panels>(IdPanel);

                db.RegisterTable <SwitchInfo>();
                for (int i = 0; i < 42; i++)
                {
                    db.DeleteItem <SwitchInfo>(IdPanel + "_S" + i);
                }
            }
            catch (Exception ex)
            {
                Debug.WriteLine("\nError \nUbicación: Capa DAL -> MPanels -> DeletePanel(). \nDescripción: " + ex.Message);
            }
            finally
            {
                db.Close();
            }
        }
Exemplo n.º 2
0
        // DeleteSwitch()
        public void DeleteSwitch(string IdSwitch)
        {
            var db = new PocoDynamo(con.GetClient());

            try
            {
                db.RegisterTable <DATA.Switch>();
                db.DeleteItem <DATA.Switch>(IdSwitch);
            }
            catch (Exception ex)
            {
                Debug.WriteLine("\nError \nUbicación: Capa DAL -> MSwitchInfo -> GetPanelSwitches(). \nDescripción: " + ex.Message);
            }
        }
Exemplo n.º 3
0
        // DeleteUser()
        public void DeleteUser(string UserName)
        {
            var db = new PocoDynamo(con.GetClient());

            db.RegisterTable <Users>();

            try
            {
                db.DeleteItem <Users>(UserName);
            }
            catch (Exception ex)
            {
                Debug.WriteLine("\nError \nUbicación: Capa DAL -> MUsers -> DeleteUser(). \nDescripción: " + ex.Message);
            }
            finally
            {
                db.Close();
            }
        }