Ejemplo n.º 1
0
        public List <ApiChangeMasterSiteReturnModel> ChangeMasterSite(int tracerID, int siteID, int userID)
        {
            List <ApiChangeMasterSiteReturnModel> _result;

            try {
                using (var db = new Data.DBMEdition01Context()) {
                    _result = db.ApiChangeMasterSite(tracerID, siteID, userID);
                }
                MultisiteAuditLogAction(tracerID, siteID, userID, _result[0].AuditMsg);
                return(_result);
            }
            catch (Exception ex) {
                StringBuilder sb = new StringBuilder();
                sb.AppendFormat("EXEC dbo.apiChangeMasterSite @TracerID='{0}', @SiteID='{1}', @UserID={2}", tracerID, siteID, userID);
                string sqlParam   = sb.ToString();
                string methodName = "JCRAPI/Business/TracerService/ChangeMasterSite";
                exceptionLog.ExceptionLogInsert(ex.Message.ToString(), "", methodName, null, tracerID, sqlParam, string.Empty);
                return(null);
            }
        }