Beispiel #1
0
        public bool InsertTdefectDetail(callTDefect defectDetail, ref long DefectID)
        {
            try
            {
                using (IDbConnection conn = WebConnection)
                {
                    conn.Open();
                    var tran = conn.BeginTransaction(IsolationLevel.ReadUncommitted);

                    DefectID = conn.Insert(defectDetail, tran);
                    tran.Commit();

                    return(true);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Beispiel #2
0
        public bool UpdateTdefect(callTDefect callTDefect)
        {
            try
            {
                using (IDbConnection conn = WebConnection)
                {
                    conn.Open();
                    var tran = conn.BeginTransaction(IsolationLevel.ReadUncommitted);

                    var result = conn.Update(callTDefect, tran);
                    tran.Commit();

                    return(result);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }