Example #1
0
 public static bool Delete(Lancprods user)
 {
     CONN = new Connection();
     try
     {
         CONN.conn.Delete(user);
     }
     catch
     {
         try
         {
             CONN.conn.Delete(user);
         }
         catch (Exception ex)
         {
             F.WriteLOG("---------------------------\n" + DateTime.Now.ToString() + " Error: " + ex.Message);
             return(false);
         }
     }
     return(true);
 }
Example #2
0
        public static Lancprods Get(int ID)
        {
            CONN = new Connection();
            Lancprods user = new Lancprods();

            try
            {
                user = CONN.conn.Get <Lancprods>(ID);
            }
            catch
            {
                try
                {
                    user = CONN.conn.Get <Lancprods>(ID);
                }
                catch (Exception ex)
                {
                    F.WriteLOG("---------------------------\n" + DateTime.Now.ToString() + " Error: " + ex.Message);
                    user = new Lancprods();
                }
            }

            return(user);
        }