예제 #1
0
        public List <ApiMultisiteCopyReturnModel> MultisiteCopy(string selectedSites, int tracerID, bool isLocked, int userID)
        {
            List <ApiMultisiteCopyReturnModel> _result;

            try {
                using (var db = new Data.DBMEdition01Context()) {
                    db.Database.CommandTimeout = 360;
                    _result = db.ApiMultisiteCopy(selectedSites, tracerID, isLocked, userID);
                }
                return(_result);
            }
            catch (Exception ex) {
                int           trueFalse = isLocked ? 1 : 0;
                StringBuilder sb        = new StringBuilder();
                sb.AppendFormat("EXEC dbo.apiMultisiteCopy @SelectedSites='{0}', @TracerID={1}, @UserID={2}, @IsLocked={3}",
                                selectedSites, tracerID, userID, trueFalse);
                string sqlParam   = sb.ToString();
                string methodName = "JCRAPI/Business/TracerService/MultisiteCopy";
                exceptionLog.ExceptionLogInsert(ex.Message.ToString(), "", methodName, userID, tracerID, sqlParam, string.Empty);
                return(null);
            }
        }