public static bool Insert(TipoServico user) { CONN = new Connection(); try { CONN.conn.Insert(user); } catch { try { CONN.conn.Insert(user); } catch (Exception ex) { F.WriteLOG("---------------------------\n" + DateTime.Now.ToString() + " Error: " + ex.Message); return(false); } } return(true); }
public static TipoServico Get(int ID) { CONN = new Connection(); TipoServico user = new TipoServico(); try { user = CONN.conn.Get <TipoServico>(ID); } catch { try { user = CONN.conn.Get <TipoServico>(ID); } catch (Exception ex) { F.WriteLOG("---------------------------\n" + DateTime.Now.ToString() + " Error: " + ex.Message); user = new TipoServico(); } } return(user); }